4

Possible Duplicate:
How can I identify what application is using a given file?

Every once in a while I'm told by Windows that I cannot perform a certain action (like deleting a file) because "the file is open in another program". However, it never tells me which program.

Is there a way to figure that out? If not, is there a way I can do a unix-like rm -f on the file? Usually I can just reboot my machine, try the action first thing after startup and then I can do it, but not always, so it'd be handy to know an alternative solution...

stoicfury
  • 155

4 Answers4

3

"Unlocker" can come in really handy if you just dont care who has it locked and you just want to be rid of it.

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

Myself I only put it in the "SendTo" and it works ok, that way it is not another item in the regular context menu.

Psycogeek
  • 9,139
2

You can use Process Explorer and search for the file handle (Ctrl-F).

Lionel
  • 426
2

I've also found that if the files have the Read-only attribute set (even if there is no open file handler for them), this message will appear when attempting to delete them. Unchecking that in the file properties will allow them to be deleted.

2

I've had pretty good luck with LockHunter. It adds an option to the right-click menu. So you can right click the file in question, select "What's locking this file?", and a window will appear listing the programs that have the file locked, along with a button for unlocking it. It'll even restart Windows Explorer if that's the problem.

Dave
  • 25,513