Hi,
I'm trying to use FileSystemWatcher to determine when a new file has been
added to a directory. However, after the file has been added, I need to
process the file. This results in a problem if the file is large and takes
time to copy, as the events appear to get received before the copy is
finished.
I've tried listening to the Created event, as well as the Changed event
(which gets fired multiple times) based on the last write time. When
listening to the event, I try checking if I can open the file for exclusive
access to determine if the copy operation is completed, but this still
doesn't seem to work all the time.
Any ideas would be greatly appreciated.
Thanks,
Michael