Check if file is overwritten

Larry Bates lbates at
Mon Jun 21 22:09:11 CEST 2004

When you open file, get last modified date
using os.path.getmtime() and set it aside.
When you are done with the file, get the
os.path.getmtime() again again, if it has
changed you will know it.

Larry Bates
Syscon, Inc.

"Esben Skov Pedersen" <spam at> wrote in message
news:Xns950FDFB6A260Aspamatgeeklinuxdk at
> How do i check if a file is overwritten by another program, while my
> is running?
> I have to monitor changes and act on them on the fly.
> It only has to work on windows, so perhaps it is possible to set op a hook
> to the system. I saw that done on a folder at one time, but i can't find
> the example now.
> I would rather that it uses a minimum of CPU, since the program always
> be running. Does anybody know the solution?
> /Esben

More information about the Python-list mailing list