From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

destination path in zip

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 

 

 

0 Kudos
Message 1 of 4
(3,167 Views)

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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 2 of 4
(3,158 Views)

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.

Message 3 of 4
(3,140 Views)

@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

 

 

0 Kudos
Message 4 of 4
(3,128 Views)