2

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.

5 Answers5

3

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.

1

It's basically

  1. Install Winrar.
  2. Right click on your data and select "Add to archive..."
  3. Select "Delete files after archiving.
  4. Archive and delete your archive.

DONE!

Credits to this guy.

1

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

rd "20110311 Data Capture Templates"
0

To get the specific 8.3 name you can simply open CMD line and type dir /X. This displays the ABCDEF~1 or ~2 etc. Remember it compresses out the spaces etc, so this command makes it easier instead of guessing on complex names

Kevin
  • 1
  • Unbelievable. Reading the question or sample output would have told you that this was the first thing I tried. Other answers have given the same answer and been downvoted already. I would downvote you if I had the rep. – iftheshoefritz Sep 11 '13 at 08:26
-1

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.

Oliver Salzburg
  • 87,539
  • 63
  • 263
  • 308