in reply to Idea to program watchdog

In Windows, programs can be notified when a directory changes. File being added, removed and changed are included, and there's a flag to monitor subdirectories. Win32::ChangeNotify implements the functionality. Microsoft's relevant documentation can be found here, in the MSDN library.

Update: Bad news. Win32::ChangeNotify doesn't call ReadDirectoryChangesW to get the actual changes, and even if it did, which process changed the file is not among the information returned.