Can't delete folder in Windows 7
2014-04
I'm trying to delete a folder in Windows 7 and get a perplexing error message: "Could not find this item: This is no longer located in G:\Graphics. Verify the item's location and try again.
I can see the folder -- I can find it. I just can't delete it.
I also get a second error message (sometimes) when I click on the folder: G:\Graphics 2009-11-17 refers to a location that is unavailable...this information might have been moved to a different location.
I'm using Windows 7; this folder is on an external hard drive. I've emptied the folder (there were items in it); I've scanned that external hard drive for errors. Trying to rename the folder yields the same enigmatic error message.
Is there a way to delete this folder?
Open Command Prompt, use dir /x
to get the 8.3 name of the folder which cannot be deleted, and then
use rd
with the 8.3 name of the folder, and it should be gone.
If this doesn't work, ensure first that the folder is empty.
yes. Boot into Linux using any of the live CDs, I would recommend Ubuntu and delete that damn folder
Try this:
Do a dir /x /ad
to get the 8.3 name of the folder (it will look like docume~1), then do a rd folder* /s
(you may even truncate it more like rd fol* /s
if there are no other directories with similar names).
If this does not work, the run chkdsk /f
(maybe a couple of times even, but check your Event Viewer>Windows Logs>Application Log to see if there are still a lot of errors. http://www.sevenforums.com/tutorials/96938-check-disk-chkdsk-read-event-viewer-log.html screenshots 6 or 8). Then try the rd command with the 8.3 again as above.
Do not forget if the file type has been corrupted, the extension may not appear in the 8.3 name, if for example you have something like this:
FILENAME.EXT
FILENAME.EXT
FILENAME
FILENAME.EXT
and the one missing its extension is the one you can't delete, use the del
command and the file name and add four spaces, then hit Enter.
For example:
del FILENAME__________
The ____________
at the end there is just to show the four spaces added.
This just worked for me on a file that was corrupted during download.
Try restarting your computer, and then deleting the folder.
When you restart your computer the folder might even be gone. It might have already been deleted, but Explorer was showing a cached image.
- Download 7zip
- Browse to folder
- Right-click rename (successful)
- Close 7zip
- Browse to folder > right-click delete
My flex builder somehow decided to create infinite folders within folders and crashed itself. Now windows cannot delete the folder, saying the file name is too long. Even Unlocker can't delete it.
The folders are created like this:
projectname-debug -> projectname-debug -> projectname-debug -> ..........
Boot up some linux live distribution and delete it from there.
You might try using the SUBST to map a long path to a new drive letter. That may get the path down short enough for you to delete some of the lower directories first.
Try the command line:
rmdir /s /q "C:\path\to\folder"
I've had a similar issue due to a screwed up subversion checkout. What I found worked was going in as deep as you can and the move the contents out. You should then be able to delete the outer part. Repeat the process with the stuff you moved out. Worked for me, but it might not be exactly the same situation.