I have a file system watcher.
It is watching one directory where faxes come in.
These faxes are written by another software program.
The create event seems to fire and then we get an error trying to move this
to another folder because it says it is in use by another process.
I imagine that the fax software opens it, and starts writing but doesn't
close it, then the
FileSystemWatcher, fires create event before the file is closed and we get
the error, the it probably closes.
If we put a 15 second pause in before moving the file, it works, but this is
only a temporary fix as if it took longer that 15seconds for them to write a
big fax, it would again fail.
Is there a better solution? Is there a way to only get the event if the
file is closed?
Or should we somehow check if the file is closed? How? Before moving it?
Thanks for any ideas.
Shane