Listening for file change beneath a folder

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

If the following question is not the appropriate newsgroup, please direct me
to the appropriate newsgroup.

I'm working on an application that must listen for files being added,
modified, or removed from a specified folder; or one of it's subdirectories.
The application will respond by collecting information about the file(s) and
updating a database. Could someone suggest a good way to listen for these
events? I'd prefer using managed code, if possible, but I'm open to any
suggestions.
 
Hi,
FileSystemWatcher class comes in handy when we want to monitor a folder for
any changes made. Consider we are having a production server which needs to
be monitored and an email should be triggered when a unanticipated file
change is encountered. In these circumstance FileSystemWatcher can be used to
monitor files in the server.
Below links shows how to do same:
http://www.c-sharpcorner.com/Upload...atcher03192007133144PM/FileSystemWatcher.aspx
http://www.expresscomputeronline.com/20040531/techspace02.shtml
http://msdn2.microsoft.com/en-us/library/system.io.notifyfilters(VS.71).aspx
 
Back
Top