So I recently for no reason performed a 'dir' command on my desktop and found that along with everything I expected to see I have a folder, with the name " " (yes, just a blank character, and I have no idea what ascii character it is) and I am trying to remove it.
So far all I have been able to do is for /f %a in ('dir /b /a:hd') do attrib %a -h and I managed to unhide the folder. Now I'm stuck with a folder that seemingly has no name, nothing in it, and when I right click and hit delete it does nothing, just blinks and stays there... I recall doing this a few years ago just cause I thought it would be funny to be able to create a folder with no name, and the I forgot about it and ended up here =P
I cannot conventionally delete the file or move it to another directory. Any ideas? or am I going to be stuck with this stupid thing?
Removing Glitched Folder
Moderator: DosItHelp
Re: Removing Glitched Folder
use this command to see if it lists the 'blank' folder:
dir ? /ad
This command can let you see the ascii value of the all folders in a hex editor when looking at file.txt The blank one might be hex ascii FF which is a blank character (and it could be more than one of them). It should be the 'blank' line inside the file.
dir /ad /b >file.txt
View it with a hex editor and see what the folder name is comprised of.
This might work if the directory name is one character and there are no other single character folder names. Only remove the echo if it prints just one command to the screen, with a blank in " ".
for /f "delims=" %a in ('dir ? /ad /b') do echo rd /s /q "%a"
dir ? /ad
This command can let you see the ascii value of the all folders in a hex editor when looking at file.txt The blank one might be hex ascii FF which is a blank character (and it could be more than one of them). It should be the 'blank' line inside the file.
dir /ad /b >file.txt
View it with a hex editor and see what the folder name is comprised of.
This might work if the directory name is one character and there are no other single character folder names. Only remove the echo if it prints just one command to the screen, with a blank in " ".
for /f "delims=" %a in ('dir ? /ad /b') do echo rd /s /q "%a"
Re: Removing Glitched Folder
You weren't perhaps screwing around with Making directories at the command line and using ALT characters. Specifically ALT-255. Whatever ALT character you used to create the folder from the command line you need to use to delete the folder from the command line.
-
- Posts: 43
- Joined: 20 Mar 2012 20:53
Re: Removing Glitched Folder
Thank you foxidrive, for /f "delims=" %a in ('dir ? /ad /b') do echo rd /s /q "%a" worked perfectly
Now I can say creating this account just to post a single question was worth it, lol - btw if an admin sees this I first created an account called "MrKnowItAll" and used an alternate email but I forgot the email password and so that pending account can be deleted if possible
I think I'll stick around though, I like messing around with batch and such
Now I can say creating this account just to post a single question was worth it, lol - btw if an admin sees this I first created an account called "MrKnowItAll" and used an alternate email but I forgot the email password and so that pending account can be deleted if possible
I think I'll stick around though, I like messing around with batch and such
Re: Removing Glitched Folder
I'm glad to see it solved the issue. Jump in to any thread and converse 
