Help me to delete a Directory
-
You said previously you could not delete the parent folder. Have you tried with the /s parameter?
rd Parent /s
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03 "Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04 Within you lies the power for good - Use it!
Honoured as one of The Most Helpful Members of 2004
PJ Arends wrote: You said previously you could not delete the parent folder. Have you tried with the /s parameter? rd Parent /s Hadn't tried that, but I do have success. I did a dir /x and got the short name which was: HTTP~1 and the I was able to delete that.:sigh: So now you all know never ever create a directory named: "http ". Thanks for everyones help. 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"
have u tried renaming it in dos by rename command. Found on Bash.org I'm going to become rich and famous after i invent a device that allows you to stab people in the face over the internet My Articles
-
I don't think the last character is a space... I've tried this (created directory with space at the end) and successfully deleted it in the Explorer...
but explorer is crafty, and decides you didn't really want that space at the end of the filename, so removes it for you (try it again, and look at the properties of the directory after you create it) -- Help me! I'm turning into a grapefruit! Phoenix Paint - back from DPaint's ashes!
-
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"
on a DOS prompt, try (suppose the folder name is "Folder ":
ren Fol* SomeNiceName
And then delete SomeNiceName. Yes, even I am blogging now!
-
PJ Arends wrote: You said previously you could not delete the parent folder. Have you tried with the /s parameter? rd Parent /s Hadn't tried that, but I do have success. I did a dir /x and got the short name which was: HTTP~1 and the I was able to delete that.:sigh: So now you all know never ever create a directory named: "http ". Thanks for everyones help. Neville Franks, Author of ED for Windows www.getsoft.com and Surfulater www.surfulater.com "Save what you Surf"
Neville Franks wrote: I did a dir /x and got the short name which was: HTTP~1 and the I was able to delete that Good old 8.3 format, nice to know it really hasn't died! ;) Ant. I'm hard, yet soft.
I'm coloured, yet clear.
I'm fruity and sweet.
I'm jelly, what am I? Muse on it further, I shall return! - David Walliams (Little Britain) -
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