Windows 7 Forums


Windows 7: Undeletable File - Delete


Undeletable File - Delete

Using command prompt to delete files that explorer.exe is locking.
Published 20 Apr 2010
Published by

Featured Tutorial

Chrome GPU Hardware Acceleration - Turn On or Off
Chrome GPU Hardware Acceleration - Turn On or Off

How to Turn GPU "Hardware Acceleration" On or Off in Chrome

Make Windows 7 bootable after motherboard swap
Make Windows 7 bootable after motherboard swap

Paragon P2P Adjust OS - Make Windows 7 bootable after motherboard swap

Windows 7 Installation - Transfer to a New Computer
Windows 7 Installation - Transfer to a New Computer

How to Transfer your Complete Windows 7 Installation to a New Computer

Clean Reinstall - Factory OEM Windows 7
Clean Reinstall - Factory OEM Windows 7

How to Clean Reinstall a Factory OEM Windows 7

User Profile - Customize During Installation
User Profile - Customize During Installation

How to Customize Default User Profile in Audit Mode
How to Delete an "Undeletable" File

information   Information
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.


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


1. - Open an elevated command prompt
Start > Search "cmd" > Right Click cmd.exe > Run as Administrator

Undeletable File - Delete-opencmd.png
2. - Leave Command prompt open; Open task manager
Undeletable File - Delete-opentm.png
3. - End process "explorer.exe"
Undeletable File - Delete-endexphowto.png

Undeletable File - Delete-explorerend.png
4. - Switch back to command prompt
Undeletable File - Delete-switchcmd.png
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

Undeletable File - Delete-commanddelete.png
5B. - FOLDER - Delete the folder.
Enter Command: RD /S /Q [DRIVE:]\PATH\TO\FOLDER
i.e
RD /S /Q C:\Users\[username]\Downloads\FOLDERNAME

Undeletable File - Delete-removefolder.png
6. - Switch back to task manager
Undeletable File - Delete-switchtask.png
7. - Restart "explorer.exe"
Undeletable File - Delete-newexphowto.png

Undeletable File - Delete-newexp.png



Need more help? Try searching our extensive help and support site.
Loading
04 Aug 2011  
drifking8887

 

thank you very much.it was a real sick for me. thanx again

My System SpecsSystem Spec

15 Oct 2011  
claudzen17

 

men..!! thanks for this wonderful tweaks it took me 7hours just finding for the right solution!
this works with me, now my undeletable file is gone forever..
i have registered myself here just to give you my thanks..
My System SpecsSystem Spec
10 Oct 2012  
swilly

 

Thanks notsograymatter,

Excellent solution to a problem that had troubled me for a few days. It worked for me deleting files from an external USB drive, on Windows Server 2008R2. Much appreciated.

Last edited by swilly; 10 Oct 2012 at 01:43 PM..
My System SpecsSystem Spec
.


05 Feb 2013  
lavanya46

 

Thanks, this was a great help. Worked perfectly.
My System SpecsSystem Spec
07 Mar 2013  
Hellblazre

 

Good god, THANK YOU! I had this url link i couldnt delete and thanks to your technique i finally got rid of the little *******. XD
My System SpecsSystem Spec
Comment

 Undeletable File - Delete problems?



Tutorial Tools



Similar help and support threads for: Undeletable File - Delete
Windows 7 Tutorial Category
Undeletable File Performance & Maintenance
Solved How to delete Undeletable folders or files from any Drive General Discussion
undeletable file Software
Solved Undeletable File General Discussion
Mysterious Undeletable File Performance & Maintenance


All times are GMT -5. The time now is 03:50 PM.



Windows 7 Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows 7" and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd