LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

filelist illegal characters

using LabVIEW 7.1 I want to list and read several files in a certain directory.

I want to recursively search and read these files starting  from a root-directory,

however the directory-path at some point contains illegal characters, probably because the data is originating from Japan.

Now the recursive filelisting is not able to look beyond that part of the directory.

Windows displays these chars as 3 square's, and Labview displays them as 3 question marks, and generates a error.

I could ofcourse manually rename the illegal chars, but since intent to analyse lots of these files, doing a manual rename would be too much work.

 

Does anyone know a solution for this problem ?? 

 

Thanks in advance ,

 

 

René

0 Kudos
Message 1 of 6
(3,552 Views)

What is your OS?

 

Can you create an empty file with one of these names, zip it up, and attach it?

0 Kudos
Message 2 of 6
(3,539 Views)

Hello Altenbach,

 

the OS is windows XP (SP3),

 

problem with zipping is that winzip itself is not able to zip this file (including its full directory):

" the name of a folder that contains files to be added has characters in its name that are not supported by the current code page"

LabVIEW shows the full path as:

 

C:\XOC39_Data_150\87760543\1\???5\TextSave\Mtfbp_12_SLAno_12.CSV

 

These 3 ??? signs are shows by windows XP as 3 squares, on a Mac or Vista these chars are shown as Japanse signs.

 

René 

 

 

 

0 Kudos
Message 3 of 6
(3,518 Views)

Looks like you've got Unicode filenames. LabVIEW 7.1 did not support Unicode, so the File I/O functions won't work correctly with Unicode filenames. Unicode support has slowly been added to LabVIEW. Not sure about the extent of its support in 8.6.

 

One alternative is to use the Windows API functions directly. I think I remember reading about using strconv, or something like that. Will have to look around. Or, you can google for "open unicode filenames XP". You will likely need to install the language support files for your operating sytem for this to work though. 

0 Kudos
Message 4 of 6
(3,499 Views)

I tried the recursive file-lister of LabVIEW 8.5 (on windows2000) and this gave me the same errors,

not being able to read past these characters.

Now I am trying to locate a "freeware" program to remove these characters recursively from the names,

leaving the rest intact. Couldn't find anything yet ...

 

René

 

 

0 Kudos
Message 5 of 6
(3,480 Views)

ramekers wrote:

I tried the recursive file-lister of LabVIEW 8.5 (on windows2000) and this gave me the same errors,

not being able to read past these characters.

Now I am trying to locate a "freeware" program to remove these characters recursively from the names,

leaving the rest intact. Couldn't find anything yet ...

 

René

 

 


You could experiment with the command line in Windows. Not sure if the command line will support such file names at all but if it goes bad there, then you are indeed in deep trouble. Try to start a command line and do a dir command in such a directory. Then try to do a rename on such a file. It might work.

 

I doubt there is a GUI application that does specifically do this task, so you may have to resort to a batch file script doing it on the command line if the above experiment shows you that this is possible at all.

 

Rolf Kalbermatter

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
Message 6 of 6
(3,471 Views)