Same problem as this question - Can't delete folder in Windows 7 - I have a folder I created in Ubuntu, and from Windows I cannot delete the folder. "Could not find this item: This is no longer located in G:\Graphics. Verify the item's location and try again."

The difference is that answers to the other question and all the other help on the net recommends using dir /x from the command line in order to get the 8.3 filename and then using rd - but my folder does not have an 8.3 filename. Here's the results of dir /x:

EDIT: Unobfuscated parent directory and the problem directory name. I see there's a space at the end... however, if I try rename without the space, Windows Explorer complains.

D:\UCT\Link\>dir /x
 Volume in drive D is Data
 Volume Serial Number is EEF3-CDDB

 Directory of D:\UCT\Link\

2011/03/16  10:42 AM    <DIR>                       .
2011/03/16  10:42 AM    <DIR>                       ..
2011/02/28  03:34 PM    <DIR>          2010DD~1     Obfuscated Directory 1
2011/01/27  01:12 PM    <DIR>          201101~1     Obfuscated Directory 2
2011/03/16  08:40 AM    <DIR>          201101~2     Obfuscated Directory 3
2011/03/04  09:12 AM    <DIR>          201102~1     Obfuscated Directory 4
2011/02/07  10:04 PM    <DIR>          201102~2     Obfuscated Directory 5
2011/03/10  04:32 PM    <DIR>          201103~1     Obfuscated Directory 6
2011/03/14  05:09 PM    <DIR>                       Obfuscated Directory 7
2011/03/12  02:47 PM    <DIR>                       Obfuscated Directory 8
2010/12/14  05:01 PM    <DIR>          BDNETW~1     Obfuscated Directory 9
2011/03/12  02:51 PM    <DIR>                       Obfuscated Directory 10
2011/03/12  02:51 PM    <DIR>                       20110311 Data Capture Templates 
2011/03/11  01:45 PM    <DIR>          NETWOR~1     Obfuscated Directory 12
2011/03/16  10:33 AM    <DIR>          SAMPLE~1     Obfuscated Directory 13
2011/03/12  02:51 PM    <DIR>          TEMPLA~1     Obfuscated Directory 14
               0 File(s)              0 bytes
              16 Dir(s)  224 967 278 592 bytes free

As you can see a number of these directories have no 8.3 file name, and when I try use rd with the long file name I get the following:

D:\UCT\Link\>rd "20110311 Data Capture Templates "
The system cannot find the file specified.

Despite missing 8.3 filenames on a number of the other directories, all also created in Ubuntu, it's only this folder that has problems.

link|improve this question
It would be slightly more helpful to know the actual directory name. – grawity Mar 16 '11 at 12:02
Edited, check now. – Fritz Meissner Mar 16 '11 at 13:04
1  
Why is it not possible to delete the file from within Linux if you created it there? Perhaps Linux used a special character instead of a space, and Windows pitches a fit when it hits that character? Off the wall speculation, but its an off the wall problem. – peelman Mar 16 '11 at 13:12
Haven't done it because I actually removed Ubuntu. But I guess I can try with a live CD. – Fritz Meissner Mar 18 '11 at 7:37
feedback

3 Answers

Your command appears to include a space at the end within the quotes. Try removing the space:

rd "20110311 Data Capture Templates"
link|improve this answer
The directory name has a space in it. With or without the space, rd says, "The system cannot find the file specified" – Fritz Meissner Mar 18 '11 at 7:40
@FritzMeissner: Have you tried using tab completion to get the filename onto the command line? – Dennis Williamson Mar 18 '11 at 7:54
feedback

Microsoft knows that its soft can't handle trailing space files/folders.

The suggested resolution there is to use the full path to the file, and include \\?\ in front of it. So in your case,

rd "\\?\D:\UCT\Link\20110311 Data Capture Templates "

should do it.

link|improve this answer
feedback

I had the same issue. I resolved it by using the 8.3 name.
In your instance that name would be: 201103~1

So, if you do a rd 201103~1 it will remove that folder.
Be careful if you have other folders that start with the same date. You might want to check with ~2, ~3, etc.

link|improve this answer
Check his dir listing: There is no 8.3 name for that file. – Jason Sherman May 5 '11 at 5:19
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.