FileSystemWatcher events not firing

  • Thread starter Thread starter A. Elamiri
  • Start date Start date
A

A. Elamiri

Hello,

For some reason the FileSystemWatcher events aren't firing. The code that
sets the event delegates
....

asmwatch.Path = AppDomain.CurrentDomain.BaseDirectory + "services\\";

asmwatch.Created +=new FileSystemEventHandler(asmwatch_Created);

asmwatch.Changed +=new FileSystemEventHandler(asmwatch_Changed);

asmwatch.NotifyFilter = NotifyFilters.FileName;

....
asmwatch is declared globally, both events suppose to show a message box
with information regarding. Problem is, these events never fire when I copy
or remove a file from the directory.

Any thoughts?
Thanks
 

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