Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to check if a File is Open

Status
Not open for further replies.

DseeDm

Programmer
Sep 2, 2002
31
US
Hello,

Hopefully this is an easy one. :)

I have a process that moves a file. Just need to check to see if the file is open before I move it. Any sugestions?

Thanks
- D
 
Try and get an exclusive lock on it. If it fails, the file is in use ...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top