How to delete undeletable & locked files, folders in Windows

If you are unable to delete undeletable, locked, ghost folders or files from Windows computer use CMD or a file deleter software to delete undeletable & locked files and folders in Windows 10/8/7.

At times you may find that you are just unable to delete a file or folder on your Windows computer. When you go to delete such ghost or undeletable files or folders you may get an Error message: Could not find this item.

Alternatively, you may also get the following messages:

  • Cannot delete file: Access is denied
  • There has been a sharing violation.
  • The source or destination file may be in use.
  • The file is in use by another program or user
  • The file or directory is corrupted and unreadable.
  • Make sure the disk is not full or write-protected and that the file is not currently in use.

Delete undeletable & locked files, folders

1] First, reboot and see if you can delete it.

2] Boot in Safe Mode and then try to delete it

3] Run ChkDsk, and then see if you can delete it.

4] Open an elevated command prompt and:

Use the del command to delete undeletable files:

del "Path of File"

Use the RMDIR or RD command to delete undeletable folders:

rd /s /q "Path of Folder"
  • /S : Delete all files and subfolders in addition to the folder itself. Use this to remove an entire folder tree.
  • /Q : Quiet – do not display Y/N confirmation

Be very careful while using this method and use the correct commands.

5] If these methods fail, I suggest you download and use a free file deleter software to delete locked files and folders.

Free File Unlocker, Delete Doctor, Unlcoker, Tizer UnLocker, MoveOnBoot, Wise Force Deleter are some free file deleter software that can help you delete undeletable, hidden, ghost files and folders.

Unlocker unlocks the file or folder if it is being used by any other program and allows you to delete it. Its Explorer integration is a big help, as all you have to do is right on the undeletable folder or file and click on Unlocker.

delete undeletable & locked files, folders

If no locking handle is found, it will still delete the folder.

Unlocker is a handy tool to have around in such circumstances, BUT it comes with a pre-checked option of installing a QuickStores toolbar for eBay, Amazon & Shopping.com.  It also places two eBay internet shortcuts on your desktop. You may want to uncheck these options.

These posts may interest you too:

  1. How to delete undeletable icons, files or folders on Windows desktop
  2. Fix problems with Locked Files and File Is Locked error
  3. How to fix The file name(s) would be too long for the destination folder error message.
Posted by on , in Category Windows with Tags
Anand Khanse is the Admin of TheWindowsClub.com, a 10-year Microsoft MVP Awardee in Windows (2006-16) & a Windows Insider MVP. Please read the entire post & the comments first, create a System Restore Point before making any changes to your system & be careful about any 3rd-party offers while installing freeware.

28 Comments

  1. trm96

    So glad they have an x64 version.

  2. JCF

    I tested a few weeks ago and worked good, however had to do the steps like 3 or 4 times before it worked.

  3. LockHunter is a good alternative. Supports 64 bit as well.

  4. Unlocker has no rival. Believe me, I’ve tested them all. I’ve been using Unlocker for years, and I’ve never had to repeat steps.

  5. Sro

    1. i choise to show unlocker in “send to” menu, and not in the main menu, for performance. (you can change it in settings, and at installed.
    2. is there times, that unlocker not work (i mean, can’t delete), so i use delete of is360, it’s very good delete tool. but i like more unlocker because it’s quicker, and because…
    3. if you not change it (delete from start up menu), unlocker jump a window when delete or name changing are faild!

  6. valamas

    My IE8 is reporting that the unlocker site.

    “Reported Unsafe Website: Navigation Blocked”

    I have continued through though.

  7. alvin

    I agree with valamas, my ie8 reported the same..

  8. derekKinny

    http://www.tooLongPath.com saved me lot of time for solving this problem

  9. Atif11

    Thank you so much

  10. Rhonda

    Its too bloody expensive!

  11. Tony Morcom

    This utility did in seconds what I have been trying to do off and on for months. Absolutely excellent and highly recommended. Thank you

  12. gregory

    I also got this error thrice so i have searched many softwares and methods for these kind of errors. Finally I found one software called Long Path Tool which is solution for such kind of errors.

  13. Kerem

    Had files that presumably generated from an old virus that just could not be deleted. Unlocker removed it withing seconds.

  14. Aftab Rizvi

    still unable to delete an image which can’t be opened too it says “The file name you specified is not valid or too long. Specify a different file name.”

  15. Zangetsu Elgomri

    Hey man you saved me HUGE THANKS BRO.

  16. marcelotulio

    Unlocker is great! Thanks for the tip.

  17. Sanjeev Gora

    some file paste inside this folder and then delete this folder

  18. Argus Cronus

    Still didn’t work with unlocker even after restart. Since I installed windows 10. Unlocker or any other program for the same purpose has completely stopped working and undeletable files became truly undeletable save for format.

  19. Robb Thurston

    Gregg, like you, I use unlocker a lot. Now sometimes I find that I simply am unable to unlcok and delete a file. Strangely, maybe 48 or 70 hours later, it is unlocked. What I could not unlock one day is unlocked three or four days later. Do you know anything as far as why this happens? Advise. Best!

  20. Ronald Carl

    you can use Long path tool to delete such files.

  21. Maria Schilling

    The same happens with me, too but I’ve never used Unlocker. A file or folder that resists to be deleted, a few hours later after rebooting can be deleted. Windows is weird 🙂

  22. prashant patil

    I’m struggling from last one month.. But
    RMDIR /f /q worked for me… Thanks a lot.

  23. Bogdan[RO]

    Try This Method i just learned that is a lifesaver …..

    ? Note: You have to have “Winrar” in order to do this.

    #1). Right click on the undeleted folder.

    #2). Archive the undeleted folder “as if you’re going to zip/rar the undeleted folder as a rar file.

    #3). In Archiving Options > Check the box for “Delete files after Archiving” Winrar will delete this folder itself from Archiving.

    This will delete the undelete folder for good. You’re going to thank ne for this!
    (You’re Welcome!)

  24. Android1

    Download the last version Unlocker 1.9.2. This is a GREAT program really!! I downloaded other programs like Lockhunter and IObit Unlocker they did not manage to delete a video mkv file that was impossible to delete. I failed alone, and these 2 programs failed also. But this program didn’t and I am still very surprised and happy, that is why I took the time to post here so you can have my feedback….this is a great help, really, and this program will help certainly many many people in the future. THANKS so much Unlocker!

  25. Saif

    UNLOCKER FIXED ALL OF THEM THANK YOU!! I trust this software now 😀

  26. Carapipo Diaculo

    thanks you so much this wars very helpful <3

Leave a Reply

Your email address will not be published. Required fields are marked *


2 + 4 =