FileSystemWatcher event fired only once

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I used the VB.NET project wizard to create a service project running on a
2003 server, then added a FileSystemWatcher to monitor one directory on the
same machine. The watcher seems to catch the first change event, but then no
more. Restarting the service doesn't fix it. Logging out/in doesn't fix it
(as I would expect, since the service is running as LOCAL SERVICE). I haven't
tried rebooting, but then even if that worked it wouldn't answer why it only
fired once.

Any ideas?
 
What events of FileSystemWatchers have you hooked event handlers too? And
what kind of "changes" are happening to the directory?

Mujtaba.
 
Me.m_oWatcher.EnableRaisingEvents = True
Me.m_oWatcher.NotifyFilter = System.IO.NotifyFilters.CreationTime
Me.m_oWatcher.Path = "C:\test\"

I copied a file to the test directory and got one Change event. I Copied a
second file to the test directory and got no event. I deleted the first two
files and copyied a third file but got no event.
 
Back
Top