Thanks
Aleu
A typical trick is to create a lockfile for the duration of a task,
and delete it as the last action. Then your second application or a
rerun can check if the lockfile exists, and exit if it does.
All the best, Timo
--
Prof. Timo Salmi ftp & http://garbo.uwasa.fi/ archives 193.166.120.5
Department of Accounting and Business Finance ; University of Vaasa
mailto:t...@uwasa.fi <http://www.uwasa.fi/~ts/> ; FIN-65101, Finland
Useful script files and tricks ftp://garbo.uwasa.fi/pc/link/tscmd.zip
(not pure batch) but perhaps you can check for an open file handle to
the file using such as Sysinternals HANDLE.EXE CLI utility.
Thanks for the hints guys.
Aleu
Generally speaking, if the file is open, you cannot rename it. If you
can rename it, it's closed, but being closed does not necessarily mean
that the originating program is done with it.
--
T.E.D. (tda...@gearbox.maem.umr.edu) Remove "gearbox.maem" to get real address - that one is dead
You could look at its length, wait a few seconds and then look at its length
again.
Or do a DIR list, wait, repeat the dir list and compare.
Another method to check if a file is open is to attempt to change attribute.
Of course, having better details about how the dump is initiated and why
would be nice too.
--
Todd Vargo
(Post questions to group only. Remove "z" to email personal messages)