Help me to delete a Directory
-
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"
-
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"
Just curious if you can drag it into another temporary folder and delete the temp with it in it.. Have you tried in DOS using a shifted space? Rocky <>< Mozilla/Firefox Crushing IE's Lead![^]
-
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 can remember doing something similar in the DOS days - Turbo Pascal would happily let you create files with spaces in the filename, but whilst DOS could see the files, there was no way it'd let you manipulate them. The only way to get rid of it was using Turbo Pascal itself to delete the file. Maybe that's your answer.. ..or maybe if you delve to a lower level of code you'll find a function that will let you delete it directly. What happens if you try and delete the parent folder? -- Help me! I'm turning into a grapefruit! Phoenix Paint - back from DPaint's ashes!
-
Just curious if you can drag it into another temporary folder and delete the temp with it in it.. Have you tried in DOS using a shifted space? Rocky <>< Mozilla/Firefox Crushing IE's Lead![^]
Rocky Moore wrote: Just curious if you can drag it into another temporary folder and delete the temp with it in it.. Drop fails, as does Cut/Paste. I can't delete the parent directory, which I would happilly do. Rocky Moore wrote: Have you tried in DOS using a shifted space? No. What is a: "shifted space"? Neville Franks, Author of ED for Windows www.getsoft.com and Surfulater www.surfulater.com "Save what you Surf"
-
I can remember doing something similar in the DOS days - Turbo Pascal would happily let you create files with spaces in the filename, but whilst DOS could see the files, there was no way it'd let you manipulate them. The only way to get rid of it was using Turbo Pascal itself to delete the file. Maybe that's your answer.. ..or maybe if you delve to a lower level of code you'll find a function that will let you delete it directly. What happens if you try and delete the parent folder? -- Help me! I'm turning into a grapefruit! Phoenix Paint - back from DPaint's ashes!
I tried using C's rmdir() and that failed. I haven't tried deleting the parent directory from C++ code, but I doubt whether you can without deleting the sub-directories first. Deleting the parent from Windows Explorer fails. It was created by C++ code.:^) 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"
Hey Neville Are you sure it's a space and not ASCII 255? Nish
-
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"
In DOS have you tried enclosing the folder name in quotes?
rd "Folder "
"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
-
In DOS have you tried enclosing the folder name in quotes?
rd "Folder "
"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: In DOS have you tried enclosing the folder name in quotes? rd "Folder " Yep. The folder is named: "http " so I wonder whether "http" is playing a part in my woes. Can't rename it either. 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"
-
Hey Neville Are you sure it's a space and not ASCII 255? Nish
Nishant S wrote: Hey Neville Are you sure it's a space and not ASCII 255? I'm 99% sure it is a space. See my reply to PJ re. "http" Neville Franks, Author of ED for Windows www.getsoft.com and Surfulater www.surfulater.com "Save what you Surf"
-
PJ Arends wrote: In DOS have you tried enclosing the folder name in quotes? rd "Folder " Yep. The folder is named: "http " so I wonder whether "http" is playing a part in my woes. Can't rename it either. Neville Franks, Author of ED for Windows www.getsoft.com and Surfulater www.surfulater.com "Save what you Surf"
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
-
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