The short answer is backward compatibility. We know that in a company like Microsoft it is sometimes impossible to get rid of something, and this is because one of the best parts of Windows is sometimes also its drag: the fact that the system continues to support software and devices as old as those from the era of MS-DOS or Windows 3.1, even today.
Windows 10 has some features that today can be considered a bug, “bugs” that have not been “resolved” for more than 40 years because they were actually intentional in a time when things worked differently. This is what happens when you try to name any file in Windows with terms like “CON”, “LPT1”, “PRN”, “NUL” or “AUX”. Not possible by design.
The forbidden words
You can try for yourself right now, try creating a folder or text document, or even renaming an image to something like CON.png or AUX.txt. Windows 10 will give you an error message asking you to change the name and that the device name is invalid.
But what device? In the age of MS-DOS (Microsoft’s version of DOS) in the 80’s, computers were a black screen with text and nothing else. So everything worked by writing orders. For a program to interact with other things, such as a printer, a command had to be written using a text file or “device file” that would interact with a driver.
Depending on the device, it has a name reserved. For example, the parallel ports that printers used to connect to use LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, and LPT9. The serial ports had reserved COM from 1 to 9. CON represents the console, and so on several more.
Why after more than 40 years you cannot name a file in Windows 10 or folders with them, because it turns out that these devices can be treated as a file. If back then you tried to do something like create a file called LPT1.txt, what you were going to do was send it to the printer or something like that and that’s why they were blocked.
If in Windows 10 you open the terminal and use a command like COPY CON genbeta.txt
, what happens is that whatever you write from now on in the console will go to that text file “genbeta.txt”.
Windows 10 retains code from the days of Windows 3.1, and Windows 3.1 was created with basic MS-DOS, as was Windows 95. With Windows NT this did not happen, but still Microsoft wanted it to be compatible with Windows 95, and Windows 10 is still partly based on Windows NT, and the same applies for Windows 7, or Windows 8.
Almost no one may use a parallel port to connect a printer anymore, but Microsoft chooses to continue to support extremely old software and devices to this day, and that’s why Windows code is an eyesore born out of an almost obsessive commitment to backward compatibility who has the occupies, a creature It occupies 0.5 TB and spans 4 million files.