Hi,
I have a C# program which creates a FileSystemWatcher and sets
IncludeSubdirectories property to true with filter set to "*.txt". The
program runs fine under WinXP but in Win2003, it does not always work.
specifically another program is writing into the directory being
monitored by my app. When i do a copy from command prompt into the
directory, my app picks it up. But when the other app writes a file into
the directory being monitored, my app does not. All the testing i have
done with my app on XP involved the copying of the file or opening it
using notepad and saving it back. The NotifyFilter is set to LastWrite.
But i am capturing the Created and Changed events using:
_fsWatcher.Created += new FileSystemEventHandler(someFunc)
_fsWatcher.Changed += new FileSystemEventHandler(someFunc)
where the someFunc is defined as a private void.
The copy does not work on the Win2003 but when i use notepad to save the
file on win2003, my app sees the event. I want my program to capture the
first time creation of the file on the directory and not when i use
notepad to save it.
Any ideas why the difference?
thanks,
BRAMOIN
*** Sent via Developersdex http://www.developersdex.com ***