Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FileSystemWatcher Created event - How to know when file is complete

Status
Not open for further replies.

pokasick

Programmer
Oct 29, 2001
17
US
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top