Home > Windows > Why can’t we create a folder by name CON?

Why can’t we create a folder by name CON?

I’ve been asked this question many a times: Why can’t we create a folder by name CON? Although it seems a wonder or magic that we can’t create a folder by that name, in reality, it is not so. It has a definite reason, and in fact, a folder can be created using that reserved name.

Gone are the days when computers had only CUI OS, that is, Character User Interface Operating Systems, like MS-DOS. When I joined my first computer course nine years ago, Windows 95 was ruling. You could see Windows 98 here and there. We were in 8th standard, and working on a computer was like a dream coming true. Microsoft’s Paint Brush was the only known (for us) GUI software and was the greatest means of entertainment. The instructors taught us only MS-DOS commands and how to Shut Down the computer. Remembering such weird names as DIR, CD, MD, RD, CHKDSK, FDISK, VER, ATTRIB, REN, DEL etc. along with their syntax and usage was a great accomplishment. But I had a problem understanding this: DOS has a separate dedicated command for every action; literally every action, except… creating a file!

Yes, we used COPY CON filename to create a file with name filename. Anyone can say that it is a form of COPY command. So, why was creating a file different than all other commands? I didn’t understand it, till I found out how to print using DOS, almost four years later.

DOS uses different names for the attached devices, I learnt. PRN was one such name. TYPE filename would display the contents of a file and TYPE filename > PRN would print it instead of displaying. Curiosity brings many hidden matters out. PRN would surely mean Printer and will redirect the output to the printer instead of console. Console (monitor) is the implicit default output device, and it can be bypassed if needed. So, how to put it explicitly? There must be some means to do that. Yes, there is! TYPE filename > CON performs exactly same function as TYPE filename. These special names for the devices really mean something special for the operating system and those names can not be used as folder or file names: CON, PRN, NUL, COM1 to COM9, LPT1 to LPT9, which stand for CONsole, PRiNter, NULl, serial COMmmunication ports, Line PrinTer ports.

The time has changed and Operating System can also be fooled! But still, many people think that it is not possible to create a folder by name CON. Using the path of network drive, these special names can also be used as folder names! Here is how:

  1. Goto DOS
  2. Type MD \\.\C:\CON. The folder will be created. You can check it in Windows Explorer also, but you can’t access it
  3. To delete the folder, type RD \\.\C:\CON

In short, use the network path syntax instead of absolute path syntax.

Now on to the practical aspect of this. Why can’t we create it directly but using the network path syntax? The answer is simple. A computer can have only one default console, printer, null etc. So, if it is accessed from a network, theoretically, the console should belong to another node in the network. Since that node may not have a device which can be referred using the name CON, it will no longer be considered as a reserved name. Hence, the folder can be created.

The next time when someone asks the question why we can’t create a folder by name CON, say with confidence that it is not true…

For more technical articles, news and forum discussion logon

Categories: Windows
  1. sakthivel
    July 10, 2008 at 2:35 pm

    Hi Raghu,

    According ur comments, today i have learnt main things(i.e way of (CON) folder creation).

    Note:one more request,please send me if you have any other tips like this.

    Thanks a lot…


    • haziq
      March 7, 2010 at 9:34 pm

      This is because it is for the standard output device CONSOLE.
      There are other names like ‘prn’ and ‘aux’ will also not work the same since they are respectively for PRINTER and AUXILLARY devices.

    • RAKESH
      October 31, 2010 at 4:05 am

      CON is a reserved word from olden DOS days.Other list of DOS devices can be used as folder name as CON,PRI,LPT1,LPT2,LPT3,LPY4,LPT5,LPT6,LPT6,LPT7,COM1,COM2,COM3…ETC

  2. Vijay Das
    July 19, 2008 at 10:49 am

    Dear Sir/ Madam,

    this is vijay from delhi, sir i want create con folder on my computer,
    so, plz give me solution how can create con folder on my computer……

    plz sir some body is challege me……

    i am waiting your reply sir…..


    Vijay Das

    • September 19, 2009 at 9:22 am

      Type con & press ALT+255

  3. July 25, 2008 at 8:03 pm

    Thanks a lot for useful article 🙂

  4. Ankur
    July 30, 2008 at 5:39 am

    hello sir!

    your trick of creating con folder is too good.
    kindly send me some more tricks like this.
    i m very thankuful to u.

  5. himanshu patel
    August 29, 2008 at 12:51 pm

    Dear Sir/Madam
    This is himanshu(sunny) from banglore, dear i want to create CON folder in my computer
    so,please give me the solution if u can

    thank you SIR/MADAM

  6. September 16, 2008 at 12:25 pm

    I found how to create a folder or file named CON , LPT1 , COM1 etc…

    STEP1: goto command prompt

    STEP2: type in prompt e:\> “mkdir \\.\e:\con”

    STEP3: verify by typing “dir \\.\e:\con”

    STEP4: delete the file or folder “rmdir \\.\e:\con”

  7. November 1, 2008 at 10:19 am

    create New Folder Rename Type Con & Alt Press Hold Type 255 & Free Alt Key Enter Create Computer Con Folder

  8. November 1, 2008 at 10:27 am

    You Create CON folder Simply Tricks.

    1 Open Any Zip File.
    2. Create New Folder This Zip File right click create new folder
    3. Enter
    4. Rename Folder Con
    5. you see create con folder

    This is Magic


  9. November 27, 2008 at 4:26 pm

    the making of ‘con’ procedure is superb…
    well done author

  10. Ibrahim
    December 6, 2008 at 12:04 pm

    hello guys just the one tht said

    create New Folder Rename Type Con & Alt Press Hold Type 255 & Free Alt Key Enter Create Computer Con Folder

    did not work..or i did not do it properly can somone say it again and specify each step plz

  11. shiteme
    December 28, 2008 at 1:47 pm

    dear sir/madam are you serious WTF????

  12. Himanshu Lenka
    January 8, 2009 at 8:52 am

    Gr8,good to have such tricky questions and solutions.
    kindly post more of such.

  13. Omera
    January 8, 2009 at 4:45 pm

    thx alot ..

  14. Mr. Medhat - Kuwait
    January 10, 2009 at 8:30 am

    Well, all I can say is that “Why only CON?” There are always “PRN, NUL, COM1 to COM9, LPT1 to LPT9”
    Anyhow, am still on the way 2 try it. Hope I’ll do it properly one day. Thanx again 4 all.

  15. Dwarka yadav
    February 15, 2009 at 5:38 am

    yes I got my ans.

  16. arthy
    March 20, 2009 at 1:27 pm

    i learnt a good thing here..
    please do send me some other tips like this,..

  17. dnand
    April 23, 2009 at 10:15 am

    To Ibrahim – “Alt 255” is the alternate way of typing “space”… check “Insert Symbols” in either MS Word or MS Excel… In other words, you still cannot create a file name with purely “CON” as a file name; What Sumit Vyas did was to add an extra space after the word “con” using the above “algotrithm”, which is why he was able to create the file name .. Ü

    raghupathy has the most plausible explanation… I also grew up during the times when we had to memorize control keys like “CTRL > OC” in WinWord to “center” the test I am typing, etc…. etc.. funny stuff which really made sense way back then.. with today’s modern OS, somehow these have become analogous to “fossils” – we marvel at them because we are no longer aware what they were originally intended for…

    Also, by sheer curiosity, try saving any MS Office file using “CON”, “NUL” etc as file names and you will get straighforward answers.. Ü

    • PriyaThandavam
      May 23, 2009 at 1:20 pm

      Really ur article is very useful.Its wondering. Thanks.

    • May 23, 2009 at 1:21 pm

      Ur article is really nice and wondering. Thanks. Great work.

  18. Rajkumar sahu
    February 9, 2010 at 8:09 pm

    sir really article very useful.
    i am created this folder is successfully

  19. deepak
    May 5, 2010 at 12:39 pm

    hello sir!your article is superb really.please share some more facts like this.

  20. sathish
    November 19, 2010 at 2:42 pm

    Good Evening sir,
    Your procedure was superb..
    but we can create a folder with folder name CON, PRN, NUL, COM1 to COM9, LPT1 to LPT9
    step1:create a folder with some name
    step2:Goto Rename and enter con then press “alt+9” 8(eight)times
    step3:press enter then you will get a folder with con name
    by this
    you can delete by ritht click+delete options
    Try this superb….
    If i done any mistakes please inform to me..

    • Dipen
      January 2, 2012 at 8:02 am

      Dear friend,i dont agree with your trick.

    March 29, 2011 at 1:07 pm

    thank u sir, for providing us best knowledge.

  22. Bhanu
    May 11, 2011 at 2:30 pm

    i m trying this but it doesnt work.why????

    • venkatesh nayak
      July 29, 2011 at 3:42 pm

      Hello sir

      I have been trying with all other options which are all provided all of you. so please tell me step by step.



    October 10, 2011 at 1:22 pm

    i can create a folder by the name of “con”…………..

  24. Yousaf Sadiq Shinwari
    November 22, 2011 at 10:41 am

    Yousaf Sadiq Shinwari from afghanistan the information was nice so thank you dear sir/modem

  25. Dipen
    January 2, 2012 at 6:59 am

    Trick to create a “CON” folder :
    Open the Command prompt by Start->Run and type in cmd
    Type MD\\.\\C:\CON
    C is the drive path, you can change this drive to your own choice of path.
    Now Open My Computer and browse through the path where you created the Con folder. surprising huh!!!
    Yeah buddy, you have successfully created a “CON” folder.
    Now try to delete the folder, it won’t get deleted by simple delete option..:)

  26. Dipen
    January 2, 2012 at 7:57 am

    The trick by Mr.Sathish pressing alt+9 (eight times) is not the Actual “CON” folder.
    Watch it clearly guys,It actually gives a space after “CON_ ” which is not a valid folder.

    The reason behind it is simple-“CON” is a reserved name from the early days from DOS, it stands for the “CONSOLE” I/O device.Since it is already used by the system,If we create one with some evil tricks then the system will get confused. There will be an ambiguity.

    Try another trick,which is posted just above this post.Post no.#31

  27. Dipen
    January 2, 2012 at 8:03 am

    Sorry,its not .#31.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: