Check if there is any other application accessing the file.
In your program:
- Check that you do not have a stream open using the file.
- Delete the file outside the FileSystemWatcher handlers. Using a button or timer or whatever. The FileSystemWatcher seems to keep the file open until the handler finishes execution.
Main Topics
Browse All Topics





by: HainKurtPosted on 2009-10-13 at 20:05:12ID: 25566900
maybe you should wait a few seconds and try again...