20 Mar 2012

Discover what's using that file you are trying to delete (or move)

Here's a quick post that should help you solve those irritable situations where you cannot re-name, move or delete a file. This is most likely because Windows seems to think that is being used by some process. And you can't figure out which.

Every time I run into this problem, I find myself turning to Process Explorer - one of my favourite freeware replacements to the windows Task Manager.


Here's a recent example, I've been trying to delete a PDF file and all I keep seeing is this error message


Sound familiar? Here's how I solve this problem.

Start up Process Explorer (available here). Press Control+F (or click Find >> Find Handle or DLL)

Type in a part of the file or folder name that has this problem and hit Search. Almost always I end up getting a result - in this case the Adobe Acrobat Reader (which makes sense since this was a PDF file I was trying to delete). 

 Double-click the process name in the list above.This will close the search Window and take you to the main window of Process Explorer and highlight the correct item. The next part is obvious - stop the process (or "kill" it). Right click and chose "Kill Process".

And boom! Problem solved :)

This is exactly the kind of usage that makes Process Explorer one of my favourite portable utilities.

See also: