Wednesday, March 15, 2006

The Con Issue with Windows

Wondering why You can't create a folder named con on a windows platform? Heres Why!!


It's not that weird. 'con' is a reserved word from the old DOS days, simply meaning 'console'. If you wanted to create a new text file in DOS you could type 'copy con newfile.txt' meaning copy from the console to newfile.txt. This would let you type some lines and when you ended the file with ^Z (DOSish for 'end of file') you would have a file called newfile.txt containing whatever you wrote in the console. This is indeed still possible in the Windows XP console, and can you see what mess it would cause if you let files or folders have the name 'con'? What would 'copy con newfile.txt' then mean? BSOD?
-http://www.theinquirer.net/?article=27053

11 Comments:

Anonymous Anonymous said...

Start|Run|command.com/cmd.exe

mkdir C:\con\
mkdir \\.\C:\con

copy C:\junk\sol.exe C:\con\
dir C:\con\

rmdir /s C:\con\

Also works with other reserved device names: AUX/PRN/COMx/LPTx..etc

10:50 PM  
Anonymous Anonymous said...

what is \\.\

10:16 PM  
Anonymous Anonymous said...

I like to think of Jesus as wearin' a Tuxedo T-shirt, 'cause it says, like, "I want to be formal, but I'm here to party too." I like to party, so I like my Jesus to party

2:39 PM  
Anonymous rabbittoe said...

Jesus will probably attend the party and bring water and will turn it into wine!

10:42 PM  
Blogger yuva said...

We can create folder CON in desktop without using Command Prompt
It is possible to Create a folder named CON AUX i succeded

I know the answer

If u want mail me
yuvatowin@gmail.com

6:28 AM  
Anonymous Pavan Kumar AR said...

This comment has been removed because it linked to malicious content. Learn more.

10:39 AM  
Anonymous Anonymous said...

You solve the question in my mind.

2:32 AM  
Anonymous dadecoders said...

It is looking Funny!So try to create these folders (or files)CON, .CON , CON. ,COM1 ,COM2 , COM3 ,COM4 ,LPT1 ,LPT2 ,LPT3 ,PRN ,NUL ,AUXOnce Check it Out.It is impossible. Interesting !You aren't allowed to create folders with names that are the same as the ones that have been used for various devices on a PC since the DOS era."CON" refers to "console" in DOS."PRN" refers to "printer,""LPT1," "LPT2," etc., and "COM1," "COM2," etc. refers to the communication ports.The bug has been tried and tested in both Windows XP Home and Professional. If you try to make a folder named "CON" (case insensitive), Windows XP renames it back to what it was. So creating a new folder with the name "CON" just renames it to "New Folder".The bug seems like a variable that got treated as a string or vice-versa. Trying to create the folder from a cmd prompt failed with an error "The directory name is invalid.".This also works when you try to create a file called "CON", or "CON.". ".CON" shows up the way it should.Methods To Create CON Folders
Method 1:goto command prompt, type in prompt e:\> ((mkdir \\.\e:\con)), verify by typing ((dir \\.\e:\con)), delete the file or folder ((rmdir \\.\e:\con))
Note::Not necessary for to go only E:,u canm create in any Drive.(This method is bulky and confusion. So You can Use)
Method 2:
Create FolderWhile name Type CON and then stroke the keyALT+0160 on numerie key pad.(CON -> ALT+0160)Then you can create CON folder and other described folders.It means that when you type a folder name with simpleALT+0160 you can create empty folder.There is no name for a folder.Here we are using "CON " (CON with space).This is the tricky logic here.on on;

7:59 AM  
Anonymous Anonymous said...

It is looking Funny!So try to create these folders (or files)CON, .CON , CON. ,COM1 ,COM2 , COM3 ,COM4 ,LPT1 ,LPT2 ,LPT3 ,PRN ,NUL ,AUXOnce Check it Out.It is impossible. Interesting !You aren't allowed to create folders with names that are the same as the ones that have been used for various devices on a PC since the DOS era."CON" refers to "console" in DOS."PRN" refers to "printer,""LPT1," "LPT2," etc., and "COM1," "COM2," etc. refers to the communication ports.The bug has been tried and tested in both Windows XP Home and Professional. If you try to make a folder named "CON" (case insensitive), Windows XP renames it back to what it was. So creating a new folder with the name "CON" just renames it to "New Folder".The bug seems like a variable that got treated as a string or vice-versa. Trying to create the folder from a cmd prompt failed with an error "The directory name is invalid.".This also works when you try to create a file called "CON", or "CON.". ".CON" shows up the way it should.Methods To Create CON Folders
Method 1:goto command prompt, type in prompt e:\> ((mkdir \\.\e:\con)), verify by typing ((dir \\.\e:\con)), delete the file or folder ((rmdir \\.\e:\con))
Note::Not necessary for to go only E:,u canm create in any Drive.(This method is bulky and confusion. So You can Use)
Method 2:
Create FolderWhile name Type CON and then stroke the keyALT+0160 on numerie key pad.(CON -> ALT+0160)Then you can create CON folder and other described folders.It means that when you type a folder name with simpleALT+0160 you can create empty folder.There is no name for a folder.Here we are using "CON " (CON with space).This is the tricky logic here.on on;

6:35 AM  
Anonymous Anonymous said...

the virus still can delete the autorun.inf folder if youll just make an con folder with con + alt+0160,its no use...

2:20 PM  
OpenID khiang said...

yup, its only for preventionto recreate autorun.inf, cause dafaultly windows didn't alow creation of files name same as folder name

to create com1, lpt1
go to command promt
c:\md autorun.inf
c:\md \autorun.inf\com1\

to remove
c:\rd \autorun.inf\com1\

its useless... virus is smarter ...

3:26 AM  

Post a Comment

<< Home