Removing Glitched Folder

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
MrKnowItAllxx
Posts: 43
Joined: 20 Mar 2012 20:53

Removing Glitched Folder

#1 Post by MrKnowItAllxx » 20 Mar 2012 21:07

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?

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: Removing Glitched Folder

#2 Post by foxidrive » 21 Mar 2012 01:32

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"

Squashman
Expert
Posts: 4488
Joined: 23 Dec 2011 13:59

Re: Removing Glitched Folder

#3 Post by Squashman » 21 Mar 2012 06:03

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.

MrKnowItAllxx
Posts: 43
Joined: 20 Mar 2012 20:53

Re: Removing Glitched Folder

#4 Post by MrKnowItAllxx » 21 Mar 2012 16:18

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

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: Removing Glitched Folder

#5 Post by foxidrive » 21 Mar 2012 23:27

I'm glad to see it solved the issue. Jump in to any thread and converse :)

Post Reply