LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

file close and then delete

After saving data to a file, I closed the txt file.

Even in this case, I got OS message regarding my application hold the txt file, so I couldn't delete it.

Is it normal? How can I do for my application to release the file?

0 Kudos
Message 1 of 4
(2,884 Views)

Hi Labmaster,

 

using error I/O would help you to recognize problems!

 

Did you check error out of FileClose?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 4
(2,859 Views)

My file routine contained some logic: close and create new file in different file name.

These error out and in are connected and no issue about that.

Even after closing the prior file, I can't delete the file in Windows only if my (buit) application is running. (LabVIEW 2012)

These handling problem seemed to be abnormal in my thinking.

Frankly, I am worrying about the allocation of memory.

 

0 Kudos
Message 3 of 4
(2,829 Views)

Are you sure you are closing the file?  Thsi sounds like a good place to pull out Desktop Execution Trace Toolkit.  It will help you find where you open and close references.

 

If you want any more help, you are going to have to attach some code.  I suspect a logic error is keeping you from closing the 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
0 Kudos
Message 4 of 4
(2,816 Views)