Monitor a directory and capture file modification events
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   sahil_k
Posted On:   Friday, May 14, 2004 01:39 PM

I am trying to monitor a directory (ex:C:/temp) or even individual files in it. Whenever the contents are modified (file created/ deleted/ renamed), I want to be notified of the event. On the console, I want to print the name of the file that was modified.


Is this possible. Program will run on windows.


Thanx

Re: Monitor a directory and capture file modification events

Posted By:   Brian_Glodde  
Posted On:   Saturday, May 15, 2004 12:22 PM

Snce it's on Windows, there's a Win32 API that handles that sort of thing wonderfully. Here's the code in VB. If you have to write it in Java, take a look at the java mail API. It has a form of FolderListener you might be able to coax into doing the job for you.
About | Sitemap | Contact