FAQ: Workaround to Error Deleting File or Folder

"There’s No Such Thing As A Silly Question" -- does the cliche sound familiar? In this part of pimp-my-rig reloaded, technical questions are answered. Mail them to me and I will post the answers here. If you have a better answer, by all means share it with us.

FAQ: Have you ever tried to delete a folder or file and got prompted with the message "Error Deleting File or Folder"? No matter what you do it seems the file (or folder) could not be deleted. How do you delete the file or folder?

The pop-up window that prompts the error message above may be similar to the one below.

In the example above, I was trying to remove a folder named "Folder". After several retries, it would seem removing the folder is a hopeless case. Searching the internet, the recommendation(s) involve rebooting the machine to free up the locked file handles.

If this is on a production machine, rebooting it would be out of the question. Is there another workaround to such a scenario that does not require a bounce? The answer to this is "yes".

Download (visit website) a utility called "Unlocker". Install the software once download is complete.

Launch Windows Explorer and return to the path containing "Folder". Right click on the folder and choose Unlocker.

It will launch the software and show the applications that are currently accessing it with locks in place so as to prevent deletion. The application window is similar to the one below. As seen, applications msiexec.exe and explorer.exe has locked the path U:\Folder.

Toward the bottom right, change the drop down from "No action" to "Delete" (or "Move" or "Copy", as appropriate). Then highlight the process to unlock and click on the button "Unlock". Similarly, the "Unlock All" button can unlock all of the file handles each process listed has on Folder.

Upon success, Folder will have been deleted and moved to the Recycle Bin. Another window will have opened to notify the success of the operation.

There you go, Folder was deleted without having to bounce the host. Unlocker is a very useful tool to delete files or folders with locked file handles.

You might also be interested in:


We at pimp-my-rig strive to keep on improving, help us reach that goal by leaving comments or constructive criticisms. Don't miss out on our next feature -- subscribe via RSS (What is RSS?).

Share This