Dec 20, 2011

Why You Can't Name a Folder ‘CON’ in Windows

There is an interesting thing I learned today while browsing the Internet. I found out that if you create a folder in Windows, right click it and try to rename it to CON it won't work. In fact, in Windows 7 if you try you get an error message that says "The Specified Device Name is Invalid." Some reports say that it will just rename it to "New Folder." I guess it depends on what version of Windows it's running on.

Go ahead, and try it. I'll give you a minute...

Right, so you see what I'm talking about huh? I thought I would do a Google search to see why that happens. Some people are claiming that even Bill Gates himself doesn't know why! That may or may not be true, but it is documented as to why you can't do it. In fact, I easily found out why on Wikipedia.

The reason is because Con is one of a few device files or keywords Windows uses to allow access to certain ports and devices. Here is a list from Wikipedia of all the Device File words.

Device keyword

Use as input

Use as output

CON Receives typed data until ^Z (Ctrl-Z) is pressed. Prints data to the console.
PRN N/A Prints text to the printer.
AUX Reads data from an auxiliary device, usually a serial port Sends data to an auxiliary device, usually a serial port.
NUL Returns null or no data. Discards received data.
CLOCK$ Returns system real-time clock. N/A
LPT1 (also 2-9) Reads data from the selected parallel port Sends data to the selected parallel port
COM1 (also 2-9) Reads data from the selected serial port Sends data to the selected serial port

So yes, although it is interesting that this happens, there is a reason for it. The next time a user comes to you asking why they can’t rename a folder to ‘Con’ you can send them this article.

Know of any other weird hidden quirks like this in Windows? Let us know in the comments. Tags: ,,,,,,

Twitter Delicious Facebook Digg Stumbleupon Favorites More

Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | stopping spam