LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

zip file in use by labview

Solved!
Go to solution

I am creating a zip file, but when my VI is done running it tells me that the file is still in use by Labview and it will not let me open or delete it. not sure how it is still in use, i even tried closing after but it was not working

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

First thought is that you are not properly closing the zip file.  Can you share some code so we can do some debugging?

 

If you need the file now, close down LabVIEW and it should be released.


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
0 Kudos
Message 2 of 4
(3,444 Views)

i am using the zip tool example that is provided by NI which I have attached. Also, I posted about this last week and never got it resolved: I want to modify this code or create code so that I can create a zip folder, which when I open the zip folder there is another folder which has a txt file in it. And they are all supposed to have the same names, So the hierarchy would be for example: testrun\testrun\testrun.txt. Where the first is a zip, then a folder, then the txt file. I can only seem to be able to create the zip file with the txt file inside of it. i need the txt file to be in a folder which is inside of the zip folder.

   

0 Kudos
Message 3 of 4
(3,438 Views)
Solution
Accepted by lvuser333

Ok, I found a very likely problem that could be causing your zip file to not close.  If you have no files to add, then the FOR loop will not iterate.  This is a problem because any output terminals will just return default values for 0 iteration FOR loops.  You just lost your zip file reference.  There is an easy fix.  Use shift registers for you file reference.  Since a shift register is a single memory location, the output of the shift register will be whatever you initialize it to.  I also recommend doing the same for the error cluster so that you don't lose an error.


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 4 of 4
(3,427 Views)