11

I see that a file has a lock on it. How could I find out the cause and root of this?

MattUebel
  • 927
  • 4
  • 13
  • 30

5 Answers5

16

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.

squillman
  • 37,618
  • 10
  • 90
  • 145
12

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.

GregD
  • 8,713
  • 1
  • 23
  • 35
9

Unlocker is a freeware utility that I have used many times for this purpose. Easy to use, right click on the file in question and it shows you which processes are locking it. You can then either kill those processes or forceably unlock all or one of the locking processes.

http://www.emptyloop.com/unlocker/

minamhere
  • 859
  • 7
  • 18
2

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.

gbjbaanb
  • 3,852
  • 1
  • 22
  • 27
1

You can use 'net file' via the Command Prompt onto the file server .

NitroAMD
  • 11
  • 1