Mega Code Archive

 
Categories / Delphi / Examples
 

Monitoring a directory- detecting changes

The Win32 API provides FindFirstChangeNotification / FindNextChangeNotification (see for details in win32.hlp). A good solution that works both with Win95 and NT can be found at http://www.rtfm.be/fpiette. There is a freeware component TDirmon (directory monitor), works perfectly and uses these functions. A sample program that monitors a directory is provided.