Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

A friend with Windows 7 somehow managed to create a folder on her computer whose name ends with "...".

Normally, Windows won't let you create folders with names ending like that. I really don't know how she managed to do it.

The Windows Explorer doesn't suffer from it too much, as all files inside are accessible and can be manipulated normally. However, it's impossible to rename it or delete it. Worse, it's impossible to delete the parent folder as well.

It can't be reached through the command line as it says the file doesn't exist.

Anyone knows a way to fix that? I don't mind to blow it up as I can move files from and to it through the Explorer normally.

share|improve this question
add comment

3 Answers 3

up vote 7 down vote accepted

You should be able to delete it using the "rd" command, but with a different syntax:

rd "\\?\DRIVELETTER:\FOLDERNAME"

The FOLDERNAME placeholder should, of course, be the actual name of your problematic folder, dots included.

If the directory is not empty, you would receive an error message. To force deletion of the directory and its contents, you can use the /s switch:

rd /s "\\?\DRIVELETTER:\FOLDERNAME"

The "\\?\" path prefix is documented here, under "Win32 File Namespaces":

http://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx

share|improve this answer
    
Thank you, I'll try that. –  zneak Nov 3 '10 at 22:41
    
It works. Thank you very much. –  zneak Nov 3 '10 at 23:18
    
+1 Ha! I never thought of using a UNC! –  Dennis Williamson Nov 4 '10 at 3:34
    
You're welcome. For the record, I just edited the answer to add a link documenting the "\\?\" path prefix. –  TataBlack Nov 4 '10 at 8:03
add comment

The only way I was able to remove a test directory with a similar name was to use Cygwin.

share|improve this answer
    
Damn. Well, thanks for testing. I'll see if I can do something similar. –  zneak Nov 3 '10 at 20:22
    
Well, it works, but it's certainly not the simplest thing ever. –  zneak Nov 4 '10 at 3:17
add comment

Boot from Ubuntu liveCD (download here), mount your windows NTFS disk/filesystem by double clicking it in nautilus. (Click at the top: "Places" menu -> "Computer")

After that, you should be able to access your windows partition and from there remove the directory.

share|improve this answer
    
I'm pretty sure it works; though, isn't downloading 600 MB of software to delete a single directory a bit overkill? –  zneak Nov 3 '10 at 22:41
    
@zneak Yes, that's why Microsoft doesn't allow you to create directories like that! ;) Anyway, it's probably the only way without having to install additional software. You might want to try DamnSmallLinux (DSL), which is smaller in size and can be installed to a 64MB USB pen drive: pendrivelinux.com/all-in-one-usb-dsl –  BloodPhilia Nov 3 '10 at 22:44
    
Just for the record, TataBlack has a solution that requires no additional software. –  zneak Nov 4 '10 at 1:38
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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