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()
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top