Why Can’t You Name a File CON in Windows?

A little-known fact about Windows Operating Systems is that there are certain names that cannot be used in files, folders, photographs, text documents, or even in Microsoft Office programs such as Word and Excel.
Just as Paco is the hypocoristic of Francisco, in English the same thing happens with the name of Con, which can be hypocoristic of Connor, Conrad, Cornelius, Constantinos, etc. It means that if you try to save a file with that name, you will run into a system error.


The curious thing about this is that the System does not let you save files not only with CON, but also does not let you do it with the following list of names:
- Aux
- PRN
- COM1
- COM2
- COM3
- COM4
- COM5
- COM6
- COM7
- COM8
- COM9
- NUL
- LPT1
- LPT2
- LPT3
- LPT4
- LPT5
- LPT6
- LPT7
- LPT8
- LPT9




The reason for this is that they are device names that have been reserved from the old MS-DOS. MS-DOS is short for Microsoft Disk Operating System, so named because it was originally created to be loaded into a computer’s memory with a floppy disk each time the computer boots up.
MS-Dos was a white text on a black screen command line operating system, where all commands were entered as text and there was no graphical user interface.
MS-DOS was originally written by Tim Paterson for IBM-compatible computers. It was introduced to the market by Microsoft in August 1981 and was last updated in 1994 when MS-DOS 6.22 was released.

It was around this time that special file types for computer components such as the printer and keyboard began to become standardized. These files were standardized so that all the components of the computer, real or virtual, could communicate with the Operating System. The list above is the standard device filenames that were assigned at the time.
Instead of every program having to figure out how to communicate with every possible device, that job was given to a “device driver.” Or simply what we have come to know as drivers.
These special files allowed an application program to interact with a device using its device driver through standard input/output system calls.

They would simply save what they wanted to print to the correct “device file”. It wouldn’t actually write to the disk, instead, the device driver would pick it up from there and do all the heavy lifting.
All the old programs would still work they could just save stuff to the device file like they always did, and the driver would take care of the real-world messy stuff.
Standardizing was a tremendous step. Programmers no longer had to worry that all programs understood how to communicate with all devices. As far as they’re concerned, they could just save a file and something else would take care of it. And finally, that meant that if a new printer came along with a complicated, shiny new feature… the manufacturer would include a new driver with it.
If You Enjoyed This Content, Feel Free To Leave A Tip Or Visit One Of The Sponsor Adverts
Sources: Tom Scott
je vous remercie pour cette magnifique explication, a chaque fois que j’essayer d’enregister un fichier ça ne voulais pas ,cella va beaucoup l’aider prochainement
I knew about LPT and those others of the list, but not about con and the reason, cool weirdo curiosity.