nikhilparchure
Programmer
I am using FileSystemWatcher to monitor File movement in some File folders.
Have added some events to handle file/files added to that directory (Created).
The directory might contain file with different extensions
eg : .txt , .rtf , .doc , .xls
I would like the event to be fired only when ( .txt Or .rtf ) files are added to the directory.
The FileSystemWatcher has a property
FileSystemWatcher.Filter = ".extension" to watch particular extension.
To Watch all the files
FileSystemWatcher.Filter = "*.*"
which would filter the files that the watcher might be screening.
But I would like to have Single Watcher to monitor two type of files eg: .rtf Or .txt
I tried FileSystemWatcher.Filter = ".rtf , .txt" but this not work.
Any solution for the above problem.
Nikhil.....
Have added some events to handle file/files added to that directory (Created).
The directory might contain file with different extensions
eg : .txt , .rtf , .doc , .xls
I would like the event to be fired only when ( .txt Or .rtf ) files are added to the directory.
The FileSystemWatcher has a property
FileSystemWatcher.Filter = ".extension" to watch particular extension.
To Watch all the files
FileSystemWatcher.Filter = "*.*"
which would filter the files that the watcher might be screening.
But I would like to have Single Watcher to monitor two type of files eg: .rtf Or .txt
I tried FileSystemWatcher.Filter = ".rtf , .txt" but this not work.
Any solution for the above problem.
Nikhil.....