Friday, October 14, 2005

Why not CON?

Received a forward today.

>An Indian discovered that nobody can create a folder anywhere named as
>"con "

>This is something pretty cool...and unbelievable... At Microsoft the whole
>team, including Bill Gates, couldn't answer why this happened! Try it out
>yourself...


The first part of the excerpt is true. But the second is probably (I hope) an exaggeration!

The reason for the restriction is that CON is the special name for the computer-console in DOS and the command-shell. CON is a device name; to create a file from the command-line, we would say COPY CON filename and then type the contents of the file, stoppping with a Ctrl-Z (the DOS end of file indicator) and pressing ENTER. And because filenames are case-insensitive, no variant of CON will be allowed.

Other names not allowed as file/folder-names include: PRN, LPTx, COMx - all device-names.
But interestingly for COMx, even if you have 4 COM ports, COM5, COM6 etc aren't allowed!!! So, does this mean Windows won't allow more than 9 COM ports??? Why not? That would be the real restriction!!!

2 comments:

High Blood Pressure said...

Hello! Blog surfing(as usual) and I found you guys. Nice feeling here. I'll come back . Keep up more stuff about hypertension, please.
All the best, hypertension

hypertension said...

Hello! Blog surfing(as usual) and I found you guys. Nice feeling here. I'll come back . Keep up more stuff about hypertension, please.
All the best, hypertension