I'm monitoring directory changes in Windows with Python win32 module. The task is to capture CREATE
, DELETE
, and MODIFY
events for both files and directories recursively in a specified directory. NotifyFlag is set like this:
FILE_NOTIFY_CHANGE_FILE_NAME | FILE_NOTIFY_CHANGE_DIR_NAME | FILE_NOTIFY_CHANGE_LAST_WRITE
The problem is duplicated events may be return and I can't figure out why, for example, a simple modification on file will result in 3 file update notifications -- exactly, two sets of notifications issued: the first set contains only 1 update notification and the other 2 -- all on the same file.
Also, any approach to eliminate duplicated events?
Thanks and Best regards!