How to delete folders that you can't delete in Windows 'Could not find this item' 'This is no longer located in' 'Verify the item's location'

Mave

TMS Founder
Administrator
Messages
162,053
Location
Belgium
Like almost every tutorial posted here, the reason of me posting this solution is because I experienced the same problem and the answer wasn't that easy to find.

The problem

You have a folder you cannot delete, every time you try to delete the folder, you get the error "Could not find this item" "This is no longer located in" "Verify the item's location and try again."





Now Google suggests you open up cmd, navigate to the folder and try to delete the folder there through the DOS name.
However, I didn't have DOS names as you can see below, so that solution doesn't work. (the DOS names are supposed to appear in between the filesize and name columns.)



The solution

Delete the folder through Cygwin.
Cygwin is a free program that allows you to navigate through Windows as if it was a Linux system. (and allows you to run linux scripts and much more)

  • Open up Cygwin
  • Navigate to the parent folder of the folder you're trying to delete (Note: you might want to cd .. a few times, and remember to use cd cygdrive to get back into the filesystem, a correct path would be cd cygdrive/c/downloads)
  • Type ls to list the files, this will show you the actual name of the folder, in my case the folder had a space in its name, of course Windows doesn't like this



  • Delete the folder by typing rm -rf 'name_of_folder ' (in my case I added the space)



Done! Your un-deletable folder has now been deleted!
 
Last edited:

Stybar

Yeah, groupsex seems to be the way to go
Messages
13,430
I mean, Cygwin is a bit unnessecary... Windows has an official version of ubuntu you can install on your Win10 machine, with the complete UNIX command line. Just search in the Windows Store for Ubuntu, you'll find it.
 

Mave

TMS Founder
Administrator
Messages
162,053
Location
Belgium
I mean, Cygwin is a bit unnessecary... Windows has an official version of ubuntu you can install on your Win10 machine, with the complete UNIX command line. Just search in the Windows Store for Ubuntu, you'll find it.
Ah crap I completely forgot about that. So I can most likely delete Cygwin and still open .sh files? Fantastic.
 

Stybar

Yeah, groupsex seems to be the way to go
Messages
13,430
Probably. I know I use it for mass unzipping files after downloading them. Like I said, it's a full UNIX command line, so .sh files should work.
 
Top Bottom