Help me to delete a Directory
-
on a DOS prompt, try (suppose the folder name is "Folder ":
ren Fol* SomeNiceName
And then delete SomeNiceName. Yes, even I am blogging now!
I had already tried that, didn't work either. See my reply to PJ's thread. Neville Franks, Author of ED for Windows www.getsoft.com and Surfulater www.surfulater.com "Save what you Surf"
-
Ok I've accidently created a directory on WinXP which has a SPACE as the last character and I can't delete it from Explorer, DOS or in code. I also can't rename it from Explorer. I figured ChkDsk would fix it up but it doesn't find any problems. What to do? And why the heck did Windows let me create it in the first place.:confused: Neville Franks, Author of ED for Windows www.getsoft.com and Surfulater www.surfulater.com "Save what you Surf"
Back in the days of Kazaa, I decided one day to uninstall it. It accidentally left a folder in there (can't remember the name) that I couldn't delete. I tried just about every way that I can think of, and even up to today (2 years later - and no I don't usually format such problems away :)), that darn folder still exists. What's funny is that I can't even open the folder in Windows Explorer or use a DOS window to peek into its contents. As far as I can see, it has no special attributes, but it won't allow me to manipulate even those in Windows and in DOS. Here's an idea for a necessary tool for someone to create. Read the content of a file or folder, determine where in assembly that file/folder is. Go down to the byte-code of that file/folder and zero it (fragment it) out completely. "For that one fraction of a second, you were open to options you would never have considered. That is the exploration that awaits you. Not mapping stars and studying nebula, but charting the unknown possibilities of existence." - Q (Star Trek: The Next Generation) ^ Blog
-
Ok I've accidently created a directory on WinXP which has a SPACE as the last character and I can't delete it from Explorer, DOS or in code. I also can't rename it from Explorer. I figured ChkDsk would fix it up but it doesn't find any problems. What to do? And why the heck did Windows let me create it in the first place.:confused: Neville Franks, Author of ED for Windows www.getsoft.com and Surfulater www.surfulater.com "Save what you Surf"
Yeah its a really annoying problem I've encountered before. One of my FTP clients downloaded a file from a unix machine, the name of which ended in a space. Spaces are legal in the filesystem, but illegal in windows. It seems the APIs allow such creation, but windows and is then unable to deal with them. KB Q101754: Unable to Delete File or Directory in File Manager[^] KB Q120716: How to Remove Files with Reserved Names in Windows[^] -- The Obliterator
-
Ok I've accidently created a directory on WinXP which has a SPACE as the last character and I can't delete it from Explorer, DOS or in code. I also can't rename it from Explorer. I figured ChkDsk would fix it up but it doesn't find any problems. What to do? And why the heck did Windows let me create it in the first place.:confused: Neville Franks, Author of ED for Windows www.getsoft.com and Surfulater www.surfulater.com "Save what you Surf"
Find the DOS short name for your folder (the one with a "~") and try to delete using this short name, 8+3. You could use Windows API GetShortPathName to find it, but I'm sure there'a an easy way through the command line. I just don't remember which one :~
Fold With Us! Sie wollen mein Herz am rechten Fleck, doch Seh' ich dann nach unten weg Da schlägt es links
-
Ok I've accidently created a directory on WinXP which has a SPACE as the last character and I can't delete it from Explorer, DOS or in code. I also can't rename it from Explorer. I figured ChkDsk would fix it up but it doesn't find any problems. What to do? And why the heck did Windows let me create it in the first place.:confused: Neville Franks, Author of ED for Windows www.getsoft.com and Surfulater www.surfulater.com "Save what you Surf"
I'm too lazy to read thru the thread ;) to see if anyone's suggested this yet, but you can prepend \\?\ to any path to turn off special character parsing, so this might work:
del "\\?\C:\path\to\dir "
If that doesn't work on the command line, I 99% guarantee it would work in C code. --Mike-- LINKS~! Ericahist | 1ClickPicGrabber | CP SearchBar v2.0.2 | C++ Forum FAQ | You Are Dumb Strange things are afoot at the U+004B U+20DD -
Find the DOS short name for your folder (the one with a "~") and try to delete using this short name, 8+3. You could use Windows API GetShortPathName to find it, but I'm sure there'a an easy way through the command line. I just don't remember which one :~
Fold With Us! Sie wollen mein Herz am rechten Fleck, doch Seh' ich dann nach unten weg Da schlägt es links
dir /x
shows you the 8.3 aliases. --Mike-- LINKS~! Ericahist | 1ClickPicGrabber | CP SearchBar v2.0.2 | C++ Forum FAQ | You Are Dumb Strange things are afoot at the U+004B U+20DD -
dir /x
shows you the 8.3 aliases. --Mike-- LINKS~! Ericahist | 1ClickPicGrabber | CP SearchBar v2.0.2 | C++ Forum FAQ | You Are Dumb Strange things are afoot at the U+004B U+20DDHow could I forget that :doh: Thanks!
Fold With Us! Sie wollen mein Herz am rechten Fleck, doch Seh' ich dann nach unten weg Da schlägt es links
-
Yeah its a really annoying problem I've encountered before. One of my FTP clients downloaded a file from a unix machine, the name of which ended in a space. Spaces are legal in the filesystem, but illegal in windows. It seems the APIs allow such creation, but windows and is then unable to deal with them. KB Q101754: Unable to Delete File or Directory in File Manager[^] KB Q120716: How to Remove Files with Reserved Names in Windows[^] -- The Obliterator
Excellent, where were you earlier.:) I'd already stumbled upon dir /x and rmdir 8.3 name which worked nicely. I'll put your links+info in Surfulater.:) Neville Franks, Author of ED for Windows www.getsoft.com and Surfulater www.surfulater.com "Save what you Surf"
-
dir /x
shows you the 8.3 aliases. --Mike-- LINKS~! Ericahist | 1ClickPicGrabber | CP SearchBar v2.0.2 | C++ Forum FAQ | You Are Dumb Strange things are afoot at the U+004B U+20DDThanks. I'd already stumbled upon dir /x and rmdir 8.3 name which worked nicely. The issue was worse because the file was: "http " and I assume http is a reserved system name. Neville Franks, Author of ED for Windows www.getsoft.com and Surfulater www.surfulater.com "Save what you Surf"
-
Back in the days of Kazaa, I decided one day to uninstall it. It accidentally left a folder in there (can't remember the name) that I couldn't delete. I tried just about every way that I can think of, and even up to today (2 years later - and no I don't usually format such problems away :)), that darn folder still exists. What's funny is that I can't even open the folder in Windows Explorer or use a DOS window to peek into its contents. As far as I can see, it has no special attributes, but it won't allow me to manipulate even those in Windows and in DOS. Here's an idea for a necessary tool for someone to create. Read the content of a file or folder, determine where in assembly that file/folder is. Go down to the byte-code of that file/folder and zero it (fragment it) out completely. "For that one fraction of a second, you were open to options you would never have considered. That is the exploration that awaits you. Not mapping stars and studying nebula, but charting the unknown possibilities of existence." - Q (Star Trek: The Next Generation) ^ Blog
Aplogies to Kazaa, it was Morpheus. "For that one fraction of a second, you were open to options you would never have considered. That is the exploration that awaits you. Not mapping stars and studying nebula, but charting the unknown possibilities of existence." - Q (Star Trek: The Next Generation) ^ Blog