in reply to is File Opened or Not
You could backup and remove all files at system startup if you know you'll get to them before the application starts up.
You could delete all zero sized files that were older than the last boot time of the machine (or just some really old date if you can't get the boot time and can live with an occasional missing log file).
If the files have a PID in the name, common on Unix systems, you could parse out the PID, and then see if the process still exists with the same PID, and if not remove the file.
bluto
|
|---|