Multiple Folder Watcher
In application development you can come across to scenario where you need to keep an eye on a particular folder and do some processing based on if file is added, deleted, changed or renamed in that folder. To achieve the same the best available option is to create the Windows Service Created for the same. But in case if you have multiple folders to watch from the same Windows Service than you need to use multiple instance of the FileSystemWatcher() class. Here is the sample code to watch the multiple folders: /************************************************************************/ // TODO: Add code here to start your service. _watcher = new FileSystemWatcher(); _watcher.Path = ConfigurationManager.AppSettings["ScanDocumentSharedPath"].ToString(); _watcher.Filter = "*.tif"; //_watcher.Changed += new FileSystemEventHandler(LogFileSystemChanges); _watcher.Created += new FileSystemEventHandler(LogFileSystemC