[python-win32] knowing "file accessed" and "file opened"

Tim Golden mail at timgolden.me.uk
Sat Feb 27 11:04:05 CET 2010


On 26/02/2010 19:52, Aahz wrote:
> On Fri, Feb 26, 2010, OptiCar wrote:
>>
>> i need to know when an updated file has been opened.
>> is it possible to watch the "OPEN" and "ACCESS" event with an adaptation
>> of the Tim Golden's script ?
>> need to work on windows, does pywin32 can ?
>> inotify is only for linux
>> dazuko can catch on linux
>> what can work on windows to see the file open and file access event ?
>
> We're using ReadDirectoryChangesW to catch changes; I have no idea
> whether that would give the info you want.

'Fraid not; I assume that that is the "Tim Golden's script"
the OP is referring to, but that only handles *updates* no
opens/reads. As Tim R points out, there's really no way to
do this in Windows without dropping down to the device-driver
kind of level.

TJG


More information about the python-win32 mailing list