Why can’t you call a Windows folder ‘CON’?

After reading this quite interesting – and entertaining – list of 25 things you didn’t know about Windows to celebrate Windows’ 25th anniversary, I got to wondering…

Number 23 says you can’t name a Windows folder “CON”. Try it. Create a folder on the desktop and call it CON, it’ll rename to “new folder”. Why? Actually, the answer’s simple…

It all goes back to the days of CP/M, the popular operating system at the time that MS-DOS was created.

You see in CP/M (and in DOS and Windows), drive letters aren’t the only things that follow the C: specification. There’s printers – LPT1: being the classic example. Serial ports – COM1:, COM2: and so on.

Now here comes the reason.

Open a Command Prompt window; you should see a black window with the white C:> prompt.

Enter dir and find a text file.

Type in copy textfile.txt CON: – replacing “textfile.txt” with the name of the file. You’ll see the contents of the file strewn all over the screen.

And that’s why you can’t name a file CON – the “CON:” device name is so heavily implanted into so many programs that if you created a file it might override that name, and could cause you any number of interesting and exciting problems. Simples!

This entry was posted in Operating Systems. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.