FileSystemWatcher Question?

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

Guest

in windows service I'm using FileSystemWatcher to monitor directory changes ,
but I have case that by such a service in stopped while stopping time many
file were copied to directory , as soon as i restart the service the files
were copied not seen by the service until I cut them to other folder and then
copy them, is there a way to make it work as soon as I start the service to
check if directory has files or not?
 
It is very easy to see if a directory has existing files.
Do not try to use the FileSystemWatcher for this step, just use
System.IO.Directory.GetFiles()
 
Back
Top