This is my first post so please feel free to flame for some bad etiquette if I make such a mistake.
My question is this. I have a log rotation utility that copies logfiles to a backup directory and then zero's them out. One of the applications this is for creates a new set of logfiles each time it starts so it's not like they are always the same name. My problem then is this. I end up having hundreds of files in the original logfile directory that are not used and are zeroed out. I would just delete them but the application that creates the log files doesn't necessarily write to the ones it creates and thus they might have a byte size of 0 as well. Now... if I delete the 'active' log files that it uses it does not crash but it doesn't create the file again either and the I might need the information it would have logged if the file was there. I need a way to find out if a file is already opened by another application or not.