I have a FileWatcher that works fine on local and network drives. On certain network drives there is a problem when the file comes from another network drive. Then the "Created" event is not fired. The UNC paths and read/write permissions are correct. I can open, edit, save, copy or delete the file with the application. The "changed" and "deleted" events fires when i process the file.
watcher = new FileSystemWatcher();
watcher.Path = source;
watcher.NotifyFilter = NotifyFilters.FileName;
watcher.Filter = searchPattern;
watcher.EnableRaisingEvents = true;
watcher.Created += new FileSystemEventHandler(OnCreate);
watcher.Deleted += new FileSystemEventHandler(OnDelete);
watcher.Changed += new FileSystemEventHandler(OnChange);
The Renamed event did the trick. I am not sure if the drive is already being watched, because i am not the owner of the share. Other Shares on the same drive are firing "Created".
Many thanks