LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Open file inside a .zip folder

Solved!
Go to solution

Could you also attach the file in question and confirm that this happens under Windows and on what type of volume/drive?

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 11 of 15
(1,152 Views)

It's a .csv file. It reads files of the same format from a different folder whether it's in a external or local drive.. All files and folders have same access right. It sees the path but return 0 for that file inside that folder.. I think the U32 output from the call Library function is calling a library that it cannot find. but with the other folder that is not an issue. but they're both located in the same directory

0 Kudos
Message 12 of 15
(1,150 Views)

Here's an additional pic showing the flow of data in the block diagram..

I also put some probe to show that it sees the file path and it exists but cant call the library and return 0.....see attached...Path probe is 1, Zlib open library probe 2

0 Kudos
Message 13 of 15
(1,144 Views)

Could it be that the file path for the ZIP file contains some non-ASCII 7 characters? So any character above ASCII code 127?

The path is passed to the Path To Text file, which converts the LabVIEW path into a string for further processing, using some LabVIEW support functions. Then the string path is used to access the file but this is happening with C runtime functions. So there is a small chance that the characters in the file path are somehow different than what the C runtime expects.

 

So can you check if the file name (and any intermediate directory) contains any special characters that are not in the standard 7 bit ASCII code range?

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 14 of 15
(1,134 Views)

If that's the case you may want to look at the quick and dirty solution I came up with over on LAVA.

 

 

It is a VI with 7-zip embedded inside it for extracting a file with odd characters in the file name.  The example I posted was for extracting the whole archive but you could probably get away with editing the command line call to extract just the one file you are interested in.  Is it possible for you to post the zip that you are having problems with?

0 Kudos
Message 15 of 15
(1,126 Views)