Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I want to delete a file, Windows complains that it is open in another program. How can I find the program so that I can close it or force the file to be deleted?

share|improve this question
I'm a big fan of Unlocker. – Luc Oct 26 '12 at 15:02
up vote 5 down vote accepted

Try Process Explorer (or Handle if you like CLI). You can get them both from Sysinternals

share|improve this answer
+1 for Process Explorer. – user3914 Oct 12 '10 at 0:31

open a command prompt with elevation and type in:

for /f "skip=4 tokens=1" %a in ('net files') do net files %a /close

The files should be closed and you can delete them

share|improve this answer
A related answer. – DavidRR Oct 8 '14 at 15:44

+1 for unlocker, which has a new site.

I can also recommend LockHunter and OpenedFilesView, especially LockHunter. I sometimes find files said to be locked, there is no process locking them and unlocking-apps say so. Others can't delete it, but LockHunter can.

Though Unlocker has the option to "delete on reboot" if all else fails.

share|improve this answer

Not an answer, but an observation... EXPLORER.EXE has a nasty habit of locking files. HANDLE.EXE is a very good tool.

share|improve this answer

I'd try this software if you're still having problems. It's free and give you a list of the processes blocking the delete with options to kill process etc.

Or you could try killbox (just Google killbox) again same sort of thing but you don't need to install killbox.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.