CodeMonkey1313
CodeMonkey1313

Reputation: 16011

How to find out what processes have folder or file locked?

How do you go about querying running processes to find out what folders or files they have locked? (i.e. you go to eject a drive and you're told that it can't be ejected because it's in use)

I'd like to either get an "off the shelf" download, or write a .NET 3.5 app to do this (primarily a Windows question).

Upvotes: 11

Views: 23959

Answers (4)

CodeMonkey1313
CodeMonkey1313

Reputation: 16011

LockHunter is a great context menu tool for Windows.

Upvotes: 7

marcc
marcc

Reputation: 12399

One of the first things I put on my Windows dev machines is WhoUses. It's nice because it's open source too.

Upvotes: 2

Rutger Nijlunsing
Rutger Nijlunsing

Reputation: 5011

http://www.emptyloop.com/unlocker/ (freeware) has a special UI for exactly this situation.

Upvotes: 0

Brian Agnew
Brian Agnew

Reputation: 272307

Process Explorer will show you this. Ctrl-F will let you search for a file and list the process(es) that have that file open/locked. You can then close that handle using Process Explorer.

There's also a command line utility called oh.exe available for download. See here for more details

Upvotes: 27

Related Questions