LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

List files incl zip

Hello,

I use recursive file list.vi to get a an array of the paths of all files
in a directory and its subdirectories for data mining. That works pretty
well.
But as these data files from an automatic test system are quite numerous
I'm thinking of zipping the files together weekly to save disk space.
To run my data mining program, I need a 'recursive file list including
zipped files .vi'. How can I realize this without extracting all zipped
files into a temporary folder? Does this exist as open source solution,
are there any ideas how to write this.....or shall I try to run the
system without zipping

Thanks for any hints
Urs Bögli
0 Kudos
Message 1 of 6
(2,921 Views)

The unzip VI (in the files palette) has a "preview only?" input. When setting this to true you don't unzip the files but you get a string with all the files in the zip archive. You just need to transform the (newline separated) string into paths.

 

Hope this helps,

Daniel

 

0 Kudos
Message 2 of 6
(2,920 Views)
Dan,
that's one possible way if I want to start programming that. You show
the way how to get the filenames, which ten are selected by my program.
Afterwards I want to open all selected files, and that is another
routine to write, I somehow has to handle the two possible cases of
'normal' files and those I have to unzip before I open it.

I had the hope, that this is much easier, like in the windows explorer
((XP) where the zipped files are searched and handled like a normal
folder - any ideas?

Thanks
Urs

Am 07.06.2011 16:40, schrieb dan_u:
> The unzip VI (in the files palette) has a "preview only?" input. When setting this to true you don't unzip the files but you get a string with all the files in the zip archive. You just need to transform the (newline separated) string into paths.
>  
> Hope this helps,
> Daniel
>  

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


I had the hope, that this is much easier, like in the windows explorer
((XP) where the zipped files are searched and handled like a normal
folder - any ideas?


You won't get around to program something! The ZIP viewability in the Explorer is an Explorer feature, not something of they underlaying Windows file API. And LabVIEW doesn't use Explorer to implement its file functions (thanks God), but accesses the according Windows file API functions.

 

Beside as Dan has suggested you could also use the OpenG LVZIP library instead, but the principle of extending the Recursive File List VI to support recursing into ZIP files will remain. The opinion if seamless integration of ZIP archives into the file hierarchy is something useful or not is certainly varied Smiley Very Happy and after lots of bug hunting, in the case of Windows 7 still not seemless at all.

Rolf Kalbermatter
My Blog
0 Kudos
Message 4 of 6
(2,895 Views)

If your drive is NTFS formatted you can use drive or folder compression. This is on the OS level, so you can access the files directly as if they were uncompressed.

See here: http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/vz_ovrvw.mspx?mfr=tru...

 

 

0 Kudos
Message 5 of 6
(2,879 Views)
Thanks folks for all your hints!
Urs

Am 09.06.2011 00:10, schrieb dan_u:
> If your drive is NTFS formatted you can use drive or folder compression. This is on the OS level, so you can access the files directly as if they were uncompressed.
> See here:<a href="http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/vz_ovrvw.mspx?mfr=tru..." target="_blank">http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/vz_ovrvw.mspx?mfr=tru...</a>
> &nbsp;
> &nbsp;

0 Kudos
Message 6 of 6
(2,870 Views)