I see that a file has a lock on it. How could I find out the cause and root of this?
-
2Is this a network file? Local File? What version of Windows? – GregD Aug 24 '10 at 13:33
5 Answers
Try the Process Explorer tool from Sysinternals. Also their Handle tool is a command line tool to find out what has a lock on something.

- 37,883
- 12
- 92
- 146
From START > RUN type in "fsmgmt.msc" without the quotes.
This is the shared folders MMC and you can manage sessions here to see who has locks on particular files.
Edited to add:
You can also connect to your server (or another computer) with this snap-in by clicking on Action > Connect to another computer. You'll have to connect to the computer that the file exists on.

- 8,713
- 1
- 24
- 36
-
2+1 You might need to run this on the file server itself and not just the client computer – jftuga Aug 24 '10 at 13:47
Use ProcessExplorer from sysinternals. Search for the locked file and you'll easily see the process that has a reference to it in the list of handles (the bottom pane):
Ever wondered which program has a particular file or directory open? Now you can find out. Process Explorer shows you information about which handles and DLLs processes have opened or loaded.

- 3,892
- 1
- 23
- 27