[python-win32] Determine file being accessed

Tim Golden tim.golden at viacom-outdoor.co.uk
Fri Jan 28 15:18:24 CET 2005


[Neil Benn]

|           I have a job where I need to move a file on a trigger from 
| another program, however this program may or may not have finished 
| writing to the file when I need to move it (I have no way of changing 
| this behavior).  Therefore I need to determine if a file is 
| still being written to, this is on a windows XP box.

[Hand-waving answer, faute de mieux]

I believe you could do this by combining
win32file.CreateFile and win32file.LockFile
from pywin32. Looks that way to me, anyhow.
But I haven't tried it (and don't have time
to experiment at the mo).

TJG

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________


More information about the Python-win32 mailing list