LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

looking for a way to properly copy file?


@johnsold wrote:

If the other application does not open the file in a mode which excludes other simultaneous access, you will not get an error.

 

How often does the other application write to the file when it has it open?  If you check the file size then wait a time slightly longer than the maximum write interval and check the size again, you can see if the other program is still writing. When the size stops changing, read it.

 

Lynn


It is not certain how frequent the application write to the file. But after some trails, I find it may be possible to use the Deny Access to implement what I need. This method might not work for the file opened by the notepad but for the application I am working with, it seems work. Here is the way, I am trying to Deny Access the file being written, if error comes out, I wait 100 ms, repeat this until no error comes out.

0 Kudos
Message 11 of 11
(374 Views)