Undeletable File - Delete

Page 1 of 2 12 LastLast
    Undeletable File - Delete

    Undeletable File - Delete

    Using command prompt to delete files that explorer.exe is locking.
    Published by
    Designer Media Ltd


    How to Delete an "Undeletable" File

       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
    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



  1. Posts : 66
    windows 7
       #1

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


  2. Posts : 1
    windows 7 32bit
       #2

    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 Computer


  3. Posts : 1
    Windows 7 Professional 64bit
       #3

    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 13:43.
      My Computer


  4. Posts : 1
    Windows 7 x64
       #4

    Thanks, this was a great help. Worked perfectly.
      My Computer


  5. Posts : 1
    Windows XP Service Pack 3 32bit
       #5

    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 Computer


  6. Posts : 31
    win7
       #6

    Thanks for the solution.

    Something is wrong with explorer in Windows 7 (apart from the annoying copy/calculating etc. while copy/del)

    I also thought it had something todo with with ownership, but it hasn't. My trick was always:

    takeown.exe /F "*" /a /r /d y (with elevated cmd box) and it worked. But only after a wait.

    This owner unknown trouble always start with a explorer map move, an update of a program, or another file operation.
    What happens I think is that the file is marked for deletion, ownership already removed, and waits for explorer to remove it from memory(?), so that it can be removed from disk. I have (super-)(pre-)fetch disabled btw.

    I hope someone finds the cause of this.
      My Computer


  7. Posts : 1
    Windows 7
       #7

    Help....this doesn't work!


    I have tried all these tricks and Assassin etc. and still have 6 .m4a files hanging out on my desktop. More ideas?!

    Thanks
      My Computer


  8. Posts : 70,210
    64-bit Windows 10 Pro
       #8

    Hello Audio86, and welcome to Seven Forums.

    See if you may be able to delete them in a command prompt at boot (step 4 below) instead.

    File - Delete from Command Prompt

    Hope this helps, :)
    Shawn
      My Computer


  9. Posts : 1
    Win 8 64bit
       #9

    I had this same problem with a desktop folder w/subfolders on WIN 8 64bit machine....Could not delete a couple of 0 byte files no matter what I tried but listed below did the trick.

    DOS Command RMDIR - If you have a directory file that cannot be deleted. If trying to delete and you receive an error message that the file cannot be found and you have tried changing permissions and that fails. Usually the file type shows as "file" and size = 0 Make sure there are no existing file(s) you want to keep In the target directory or any sub-directory.

    In this case I am using stuff as the target directory
    1) Open command prompt as administrator
    2) Change to the parent directory ex. C:\Users\bullwinkle\Desktop
    3) Type the following RMDIR stuff /s /q
    /S Removes all directories and files in the specified directory in addition to the directory itself. Used to remove a directory tree.
    /Q Quiet mode, do not ask if ok to remove a directory tree with /S

    This can also be done in an elevated command prompt with the del command to target an individual file as well. For help and list of
    switches type del /?
      My Computer


 
Page 1 of 2 12 LastLast

  Related Discussions
Our Sites
Site Links
About Us
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
All times are GMT -5. The time now is 17:34.
Find Us