Check if file is overwritten
lbates at swamisoft.com
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.
"Esben Skov Pedersen" <spam at geek.linux.dk> wrote in message
news:Xns950FDFB6A260Aspamatgeeklinuxdk at 220.127.116.11...
> 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?
More information about the Python-list