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:
- Goto DOS
- Type MD \\.\C:\CON. The folder will be created. You can check it in Windows Explorer also, but you can’t access it
- 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…
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…
Regards,
Sakthi.P
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…..
regards,
Vijay Das
Type con & press ALT+255
Thanks a lot for useful article
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.
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
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”
create New Folder Rename Type Con & Alt Press Hold Type 255 & Free Alt Key Enter Create Computer Con Folder
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
s78648007@yahoo.co.in
the making of ‘con’ procedure is superb…
well done author
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
dear sir/madam are you serious WTF????
Gr8,good to have such tricky questions and solutions.
kindly post more of such.
thx alot ..
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.
yes I got my ans.
sir,
i learnt a good thing here..
please do send me some other tips like this,..
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.. Ü
Sir,
Really ur article is very useful.Its wondering. Thanks.
Sir,
Ur article is really nice and wondering. Thanks. Great work.