I bet you never would have thought that there were names that could not be given to files and folders within Windows… NEITHER DID I. You’re probably thinking Microsoft wants to limit and have control over everything you do on your computer (which might be true in other cases). But the reality is that this is due to technical reasons within Windows which actually date back to the MS-DOS era. But before I cover any technical details, let me list the names that cannot be assigned to files or folders:
I bet you’ve already tried to create a folder with one of these names already, and received an error. Now depending on which version of Windows (or MS-DOS if you can’t run Windows on your 1983 Intel 286 desktop) you are using, you’ll get an error message with a slightly different message. Windows 10 will report an invalid device name, MS-DOS will report a duplicate file name.
But what is preventing us from doing this? The names listed above are files that actually exist in system. WHAT?? Let me explain…
As an example let’s use the file LPT1. If you were able to get notepad to save data (plain text) to LPT1, it would actually send this data to port LPT1. LPT or Line Print Terminal is a (definitely old) printer port that allowed your computer (your computer is definitely old if it has one) to send bytes of data and plain text to the printer to be printed on paper. See the picture below…
Those were the days
Basically LPT1 isn’t technically a file stored on the computer, but is set up that way so that programs don’t have to implement more advanced programming of printer routines. Instead they just print or “save data” to a file and it would print at the printer.
By the way, the numbers next to LPT or COM are there because systems could have several of the same ports onboard (As mentioned earlier, if you have at least one of these traditional ports your computer is old, let alone multiple).
CON is the same thing except anything saved to it would print in the command prompt or just on your screen if your were using MS-DOS (a.k.a the fullscreen command prompt that was before windows). It’s short for CONsole which is what a command prompt is displaying.