GoHacking.com: Ethical Hacking and Cyber Security
Home » HOW-TO GUIDES, WINDOWS VISTA HACKS, WINDOWS XP HACKS

How to Create a CON folder in Windows?

Submitted by on Thursday, 21 February 200823 Comments

Can you create a folder named “con”, “prn”, “nul” “com1″ “com2″ “lpt1″ etc. in windows ?

The answer is NO and YES!

NO because when create a new folder and try to rename it to any one of the above specified names, you know what happens! In Windows XP the folder name automatically changes back to “New Folder” no matter you try any number of times. Where as in Windows Vista/7 when you try to rename the file you get an error message “The specified device name is invalid”.

What is the reason for this? Simple, these names represent the internal devices and hence we cannot create folders with the above names.

 

YES because it is still possible to create these folders using the command prompt. Here’s the instructions to create it.

 

1. Go to command prompt

2. Type in prompt (FOR EG. TO CREATE CON FOLDER IN E: DRIVE)

C:\>md \\.\e:\con

NOTE: “con” can be replaced by any other names such as “prn”, “nul” “com1″ “com2″ “lpt1″ etc.
 

3. To delete the folder use the following command

C:\>rd \\.\e:\con

NOTE: The folder can only be deleted from the command prompt.You cannot remove it by right-click delete.

Popularity: 3% [?]

Visitors who read this post, also read:

  1. How to Create Your Own Customized Run Commands

  2. How to Install Windows 7 From a USB Drive


Subscribe to GoHacking.Com


Enjoyed this article?
Subscribe to GoHacking.Com and get daily updates in your email for free


  By using/following this site you agree to our Legal Disclaimer

23 Comments »

  • dadecoders said:

    It is looking Funny!So try to create these folders (or files)A HREF=”http://dadecoders.blogspot.com/2007/11/can-you-create-folder.html” REL=”nofollow”CON/A, .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 A HREF=”http://dadecoders.blogspot.com/2008/05/dos-hacking.html” REL=”nofollow”DOS era/A.”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 A HREF=”http://dadecoders.blogspot.com/2007/11/can-you-create-folder.html” REL=”nofollow”folder named “CON”/A (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.A HREF=”http://dadecoders.blogspot.com/2007/11/can-you-create-folder.html” REL=”nofollow”Methods To Create CON Folders/ABR/Method 1:goto command prompt, type in prompt e:\gt; ((mkdir \\.\e:\con)), verify by typing ((dir \\.\e:\con)), delete the file or folder ((rmdir \\.\e:\con)) BR/Note::Not necessary for to go only E:,u canm create in any Drive.(This method is bulky and confusion. So You can Use)BR/Method 2:BR/Create FolderWhile name Type CON and then stroke the keyA HREF=”http://dadecoders.blogspot.com/2007/11/can-you-create-folder.html” REL=”nofollow”ALT+0160/A on numerie key pad.(CON -gt; 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 quot;CON quot; (CON with space).This is the tricky logic here.on on;

  • puruu said:

    ha its very easy
    just create new folder
    rename it by using alt+2+5+5 (2,5,5 no. should be typed from numpad by turning it on)
    after this you can give any name or u can leave the folder with blank name.
    enjoyyyyyyyyyyyyyyyyyyyyy

  • Sahil said:

    Ha its impossible. Puruu is wrong `alt+2+5+5` is a code of a simvol which we can`t see in desktop. But if you enter `alt+2+5+5` in Excel file you`ll see this symbol. So it is impossible to create CON folder

  • Sahil said:

    dadecoders is wrong too, because we can create empty folder not only with `ALT+0160`. We can create empty folder with every symbol which is`nt appear when we enter this codes/ And it means that there are have a name which we cannt see.
    Enjoyyyyyyyyyyyyyy

  • bharath said:

    yes of course its right thanks for tho info buddy

  • t0m5k1 said:

    why would you want to create a folder called con?

    i think windows is seeing these as device names & rather than causing confusion to itself it will not allow these names to be used as a folder name in case some poorly written application see’s it as a device!

    i think you could use ubuntu linux to access the drive using fuse & create the folder that way (because it is windows stopping you NOT the ntfs) but weather windows will display/acknowledge this folder is another story

    it would be intersting to see if windows has this behavior with other supported filesystems!

  • Faizan said:

    well all the tricks as well as comments are great

  • prasoon said:

    ultimate website

  • viplove pandey said:

    very great and useful tricks

  • Matt Stevens said:

    Thanks for tell us, I was searching for it Thanks alot.

    It is really pretty cool…nobody can make this folder on desktop.

    Thanks

  • MastiMaza said:

    Its A Challenge To Microsoft And billgates:)
    I Can Make all the Folder That No Body Can Makes

  • bhadresh said:

    so useful for me thanks

  • Sumit said:

    hey. thanx yar its very easy and also working

  • sanket chaturvedi said:

    it is verry easy press alt+255 from sanket

  • Ravi Kumar said:

    The best blog have ever come across! Must have a look at this guys!

  • master said:

    Great Website…

  • NawabSab said:

    All tricks are great …… keep it up guys …..

  • manali khadaria said:

    thanks guys for these informations

  • sameer said:

    guys really brillient

  • Satish said:

    Good One……!!!!!

  • Rohan Patil said:

    It’s very easy …. so u should know dat .Jst create a new folder press alt+0160 n then write con n c dat …

  • Vinod Sharma said:

    Make a folder and rename it by Pressing ALT Key+0160. Now rename it to CON. Well it is created to CON. Ok
    Regards:
    Vinod Sharma

  • JinS said:

    Bt…can we remove this folder ‘con’?
    tell me the trick for this…

Leave your response!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.