Tuesday, October 2, 2012

How to Delete an "Undeletable" File

This tutorial shows you how to delete undeletable files and folders. There are times when
explorer.exe somehow locks files into place and won't allow them to be deleted. In order to delete
them you must close explorer.exe and use a command prompt to delete the file.

Be very careful when deleting files through command prompt, it's possible you could accidentally delete the wrong file.

1. - Open an elevated command prompt

Start > Search "cmd" > Right Click cmd.exe > Run as Administrator


  2. - Leave Command prompt open; Open task manager

 3. - End process "explorer.exe"


 4. - Switch back to command prompt


5A. - FILE - Change to the directory of your file and delete it.

First run this line: cd "PATH OF YOUR FILE"
i.e. cd "%USERPROFILE%"\Downloads"
Now run this line: del filename.extension
i.e. del filename.mkv


5B. - FOLDER - Delete the folder.

Enter Command: RD /S /Q [DRIVE:]\PATH\TO\FOLDER
RD /S /Q C:\Users\[username]\Downloads\FOLDERNAME

6. - Switch back to task manager

7. - Restart "explorer.exe"

No comments: