05-20-2015 10:54 AM
Using New Zip FIle.vi to create a zip file
All I want to do is to add files in a directory to that zip file.
I am confused what I should wire in to the destination path in zip for the Add File to Zip.vi
05-20-2015 11:11 AM
The Destination Path In Zip is just a relative path to the top directory of the zip file. So an path of just the file neame save the file will be the top level directory. If you use something like "foo\bar\blah.txt", then the file will be inside of the foo\bar directory inside of the zip file.
05-20-2015 12:42 PM
Why wouldn't NI make this function easier to use and leave that input as recommended, and have it default to the relative path from the root of the zip, which in my mind would be the highest common path? OpenG has an Compress Files VI which is similar but it default to have the name of the file in the zip, be the name of the file outside of the zip. Just another example of NI implementing 90% of an OpenG function but leaving something to be desired.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
05-20-2015 01:02 PM
@Hooovahh wrote:
Why wouldn't NI make this function easier to use and leave that input as recommended, and have it default to the relative path from the root of the zip, which in my mind would be the highest common path? OpenG has an Compress Files VI which is similar but it default to have the name of the file in the zip, be the name of the file outside of the zip. Just another example of NI implementing 90% of an OpenG function but leaving something to be desired.
You are right. It shouldn't be that difficult.
It turns out that I needed to wire in just the filename itself.
I found the solution for my basic needs at https://decibel.ni.com/content/docs/DOC-11119