LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

zipping txt files

hi,
I am collecting data usingGPIB interface and storing them into a text file.
Can I use winzip to zip these files automatically through Lv 6i during
the process of saving these files?
(these files are large files thats why the zipping)
thanks
ananth
0 Kudos
Message 1 of 6
(3,815 Views)
There is a command line interface for Winzip available for download at the
Winzip site; these are simple commands for zipping and unzipping files and
can be called using Labview's "exec" function.

ananth wrote in message
news:3a6cb3a3@newsgroups.ni.com...
>
> hi,
> I am collecting data usingGPIB interface and storing them into a text
file.
> Can I use winzip to zip these files automatically through Lv 6i during
> the process of saving these files?
> (these files are large files thats why the zipping)
> thanks
> ananth
>
0 Kudos
Message 2 of 6
(3,815 Views)
I had to do something similar with a Visual Basic program. The solution wasn't
very elegant, but it worked. After the text file was created and closed,
the program created a batch file (.bat) and executed the batch file in a
DOS window to zip the text file into a self-extracting executable which was
much easier to distribute to the data user. I suspect you could do something
similar in LabVIEW. The batch file didn't contain much, just the DOS command
prompt to run the zip utility with command line parameters specifying the
text file name and the option to create a self-extracting executable. At
the time, I don't think winzip allowed you to run it with command line parameters,
and I wound up using a utilty called ZipMagic 2000, which did.

Hope this helps
Dave

"a
nanth" wrote:
>>hi,>I am collecting data usingGPIB interface and storing them into a
text file.>Can I use winzip to zip these files automatically through Lv
6i during>the process of saving these files?>(these files are large files
thats why the zipping)>thanks>ananth>
0 Kudos
Message 3 of 6
(3,815 Views)
I don't want to do any advertesing here, but take a look at
http://www.xon.de

There are some useful Add Ons for LabVIEW and also a ZIP-Toolkit. But
they are not free...


ananth schrieb:
>
> hi,
> I am collecting data usingGPIB interface and storing them into a text file.
> Can I use winzip to zip these files automatically through Lv 6i during
> the process of saving these files?
> (these files are large files thats why the zipping)
> thanks
> ananth

--
Torsten Levin Tel.: ++49-(0)89-72495-451
Kayser-Threde GmbH Fax: ++49-(0)89-72495-291
Perchtinger Str. 3 mailto:TL@kayser-threde.de
D-81379 München http://www.kayser-threde.de
0 Kudos
Message 4 of 6
(3,815 Views)
Ananth,

If you don't want to rely on external executables, here's a chunk of
example code that one of the NI Applications Engineers created using
an open-source compression library called zlib. Homepage for zlib is
http://www.info-zip.org/pub/infozip/zlib/ .

Note that this is Windows-only--it relies on both a DLL and a CIN, I
believe.

Regards,
John Lum
National Instruments
0 Kudos
Message 5 of 6
(3,816 Views)
Hi,

I would like to zip 2 text files in one zip archive. So, I used ZlibDeflate.vi passing the data of the file in parameter, and it zip good, but I can't open it with winzip. How to pass the full file (data + file format?) to the function to can zip 2 files inside the same zip file?

Thanks a lot for your help
0 Kudos
Message 6 of 6
(3,814 Views)