How to Delete Locked or Undeleteable Files in Windows

You  may have came across a situation when you try to delete a file and Windows does not allow you to do that. You might get a pop up saying “file might be in use or is not deletable”.

Actually, locked files are one which is locked by explorer.exe process, which prevents you from deleting the file. In many situations, it is advisable not to touch those files because they might be useful for proper working of your system.  But if you know that it’s not, you may follow this step by step guide to delete that file.

1. Open Command Prompt by typing cmd in the Start Menu search field and hitting the “Enter” button. Keep it open.

2. Locate the file you want to delete.

3. Now, open Task Manager by using “Ctrl+Shift+Esc”. Click the Process tab. Find explorer.exe and click on “End Process” button. (do not close Task Manager)

4. Now go back to the command prompt and locate the file by navigating through directory. Type cd to enter in a particular directory. For example if you want to go through file present in a folder C:\Documents and Settings\My Documents\ Folder\ Filename then type the command cd c: \Documents and Settings \My Documents \Folder in the command prompt to go to that folder.

5. Now delete the file using del filename command where filename is the name of file you are deleting.

6. Once the file is deleted, open Task Manager again and click on New Task by going to File > New Task.

7. Type explorer.exe in the box appeared and hit Enter.

Note: Deleting files through cmd commands is an easy process but you should locate it correctly before deleting. Deleting any important Window file or other useful file might cause problem in your operating system.