Hi,
I'm using the FileSystemWatcher.Created event to let me know when a file has been written to a directory. Then I can encrypt it and move to to where it needs to be. The created event fires immediately upon the creation of the file. The problem is that on a large file, the encryption process fails because it's trying to encrypt the file while its still being written.
Does anyone have any ideas about how I can determine if the file has been completely written to the directory? I've been looking at the FileSystemWatcher filter options, and digging through the parameters passed to the created event, but have not found anything yet.
Thanks for any help you can offer,
Paul
I'm using the FileSystemWatcher.Created event to let me know when a file has been written to a directory. Then I can encrypt it and move to to where it needs to be. The created event fires immediately upon the creation of the file. The problem is that on a large file, the encryption process fails because it's trying to encrypt the file while its still being written.
Does anyone have any ideas about how I can determine if the file has been completely written to the directory? I've been looking at the FileSystemWatcher filter options, and digging through the parameters passed to the created event, but have not found anything yet.
Thanks for any help you can offer,
Paul