FileWatcher fires change event after file deletion
- by florin
Hi all,
I'm using a FileWatcher to trigger processing of files as soon as they are added to a folder. After the file it is processed it is deleted.
My problem is that after the file is deleted I get another file change event which is so close to the deletion than in some cases checking for File.Exists it tells that the file still exists. But of course some milliseconds later when looking to process the file it does not really exists.
The FileWatcher is set to notify on
NotifyFilters.FileName | NotifyFilters.LastAccess | NotifyFilters.LastWrite | NotifyFilters.Size | NotifyFilters.Attributes
Thanks,
florin