An application can specify a set of conditions that trigger a change notification by using the FindFirstChangeNotification function. The conditions include changes to file names, directory names, attributes, file size, time of last write, and security.
An application can specify a set of conditions that trigger a change notification by using the FindFirstChangeNotification function. The conditions include changes to file names, directory names, attributes, file size, time of last write, and security.
For simple notifications, you can use Directory Change Notifications. There's already a quite big and comprehensive example on the page and I will not write another example.
File system notification events can be obtained by the Win32 API function FindFirstChangeNotification (look more in detail in the MSDN). This function creates a change notification handle and sets up initial change notification filter conditions.