Unable to delete file? Unlock and force delete undeletable file with a few clicks in Windows 7

You must have encountered this issue before – when you are trying to delete a file, Windows pops up a dialog telling you that Windows could not remove it, the file is used by an other application. As many of us know, we could use the famous freeware named UNLOCKER to unlock the file and then delete it. But maybe you don’t know that if your operating system is Windows 7, you could delete the obstinate file without any third party software, the method is deadly simple.

Press the Windows key and R to bring out the run dialog, then type perfmon.exe /res to bring out the built in Windows Resource Monitor( or you can launch Resource Monitor via the start menu search ).

Now navigate to the CPU tab, you will see a edit box named Search Handles at the right side of Associated Handles label, click to active it then type the filename which you want to unlock then press enter, you will see all the processes which is occupying the file you want to remove. Right click on them and choose End Process from the pop up menu.

Now your file is free, it’s not the slave of any process anymore, you could move it to Recycle Bin or delete it permanently.


6 Responses to Unable to delete file? Unlock and force delete undeletable file with a few clicks in Windows 7

  1. TheMan says:

    Thanks. It worked for me.

  2. D says:

    Hey there everyone.
    I cant get rid of “install.exe”
    this trick above will not touch it
    unlocker wont touch it
    lock hunter wont touch it
    please help me kill this creepy file
    Thanks
    D.

  3. sivaneswaran says:

    Hi there, i am unable to delete a file with 0 byte in size from desktop. when i try to delete in normal way, it say could not find the location, try again. I have try out to delete by using few freeware tool but unable to delete the file. Kindly reply me if there is a solution for this. Thank you.

    • admin says:

      Hi, sivaneswaran, you can launch Command Prompt( CMD ) from the start menu, then navigate to the location of the zero byte file( type in CD desktop and press Enter ), then get the short name of the file by typing in dir/x, suppose that the filename of the 0 byte file is file~1.txt, you can remove it with the command del file~1.txt or erase file~1.txt( or rd folder~1 if it’s a folder ).

  4. PeterC says:

    Thank you so much; this article was the solution to my problem! Turned out that that [email protected] wmpnetwk.exe (Windows Media Player Network Sharing service) decided out of the blue that I wanted to share one of my folders for Media Player streaming (although I didn’t even want the service itself in the first place!!!), then didn’t let me to delete the folder, or even access it, & the error messages gave no single clue whatsoever as to what the heck was going on! Stopping the darn service took care of the problem.

    It baffles the mind that with all the negative PR Microsoft has been getting for decades [some well-deserved, some aren't], they keep annoying users with blunders like this. But to give them credit when it’s due, finally they provide the diagnostic tools that help diagnose & solve such problems. (Apparently it was a very good idea to hire Mark Russinovich! :-) )

    Thanks again for the article!