WANTED: logging of all file operations on Windows

Claudio Grondi claudio.grondi at freenet.de
Sun Jul 9 18:02:25 EDT 2006


Tim Golden wrote:
> Claudio Grondi wrote:
> 
>> I am aware, that it is maybe the wrong group to ask this question, but 
>> as I would like to know the history of past file operations from 
>> within a Python script I see a chance, that someone in this group was 
>> into it already and is so kind to share here his experience.
>>
>> I can't believe, that using NTFS file system in Microsoft Windows 2000 
>> or XP it is not possible to track file events as:
>>
>> - updating/modifying of an existing file/directory   
>> - deleting an existing file/directory
>> - creating a new file/directory
>> - _moving_ an existing file/directory (should _NOT_ be covered by the 
>> event duo of  deleting an existing and creating a new file/directory)
>>
>> Any hints towards enlightenment?
>>
>> Claudio Grondi
> 
> 
> On the offchance that you haven't seen it, you might
> look at this:
> 
> http://timgolden.me.uk/python/win32_how_do_i/watch_directory_for_changes.html#use_readdirectorychanges 
> 
> 
> but since it doesn't fulfil your criterion of *not*
> representing renames by a delete and an add, it may
> well not be suitable. Apart from that, I think it does
> what you want.
> 
> TJG

It seems, that it will be necessary to use some logic based on the 
sequence of events to exactly detect rename and move changes done to 
files/directories, but in principle it is the best approach I know about 
yet.

Thank you!

By the way:
   Is there something similar/same available for Linux?

Claudio Grondi



More information about the Python-list mailing list