[CMI.PM] Mongers - need to pick your brains

Price, Bob BPrice at atgf.com
Fri Aug 24 08:00:50 PDT 2012


I’m looking for a way to find out on a windoze platform whether or not a file is open by another process or user.

Scenario: 

I have a process that copies files from one location to another, and deletes the original file upon successful copy. The problem arises when a user is holding that file open in another program (i.e. open in acrobat, still being written, etc.), and I don’t want to loop back and copy the file again. I would rather be able to determine that the file is in use, and just skip on to the next file, coming back later to check on the file and process it when it is no longer in use.

Any experience with this?



More information about the Champaign-Urbana mailing list