Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

FileOpen/File In Use

$
0
0
There is an app that writes to a file.  When the file is complete, I need to move the file to another location.  I have no control over the application that is writing the file.  What I have done is to check the file size, sleep for 30 second and then check the file size again.  If they were equal, I would assume the file was done writing.  Most of the time that works fairly well.

Unfortunately, on the first of the month, the other application could have the file open and writing to it for 4 or 5 hours while the job runs.  There may be times when nothing gets written to the file for 5 or 10 minutes.  What I need is a way to check the file to see if it is open by another process.  I have scoured the help files and the forum but haven't found anything that looks to be my solution.

Is there something in AutoIT that will return some value to let me know if the file is really in use?  I have experimented with differrent files and AutoIT will let me do a FileOpen and read from a file that I already have open with another application.

Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>