Using Unlocker to Force Windows to Delete a File

Using Unlocker to Force Windows to Delete a File
Page content

Have you ever tried to delete a file from Windows and not been able to? You may have received an error message that reads “Cannot delete Folder: It is being used by another person or program. Close any programs that might be using the file and try again.”

This is most likely from a buggy application that took control of the file but will not relinquish it. Essentially, this file is undeleteable, because Windows sees the file as being in use.

Unlocker

Enter a tool called Unlocker, which can be downloaded at the following URL: https://www.emptyloop.com/unlocker/ (a minimum donation is suggested). This tiny application can resuolve this issue. It adds itself to Explorer’s context menu and places a small icon in the taskbar. Whenever you encounter such an error, it will automatically grab it and ask you if you want to “unlock” the file. This will destroy all the file locks placed by any application which is currently using the file, allowing you to modify/delete it as per your needs.

It comes as a tiny 255-KB application that will be installed instantly. Once done, just right click on the offending file and click on Unlocker. It will instantly list all applications that are currently locking the file. To unlock the file, just click on “Unlock All” to kill all open handles for that file. Alternatively, you can instead kill the process that’s hogging the file or select a specific application from the list and destroy all the handles created by that application.

Final Steps

Once you’ve unlocked the file, all that’s left to do is delete it. If Unlocker fails at unlocking the file, it will offer you the option to delete the file at the next Windows startup, since the offending application wouldn’t yet have had a chance to lock the file. In most cases you won’t need to resort to this final step, but it’s good to know that this application can be used to weed out the hardest-to-delete files as well.