windows factInteresting Windows Fact: Why You Cannot Create Certain Folder Names
Hello everyone, hope you are doing well.
Did you know that Microsoft Windows does not allow users to create folders with certain names such as:
CON
PRN
AUX
NUL
COM1 to COM9
LPT1 to LPT9
If you try to create a folder with any of these names, Windows will display an error message and prevent it from being created.
Reserved Names in Windows
Some commonly restricted names are:
CON
PRN
AUX
NUL
COM1
COM2
COM3
COM4
COM5
COM6
COM7
COM8
COM9
LPT1
LPT2
LPT3
LPT4
LPT5
LPT6
LPT7
LPT8
LPT9
These names are known as reserved device names.
Why Are These Names Restricted?
The reason dates back to the early days of DOS (Disk Operating System).
In DOS and later Windows systems, names like CON, PRN, AUX, COM, and LPT were used to represent system devices instead of regular files or folders.
For example:
CON→ Console (keyboard and screen input/output)PRN→ Printer deviceAUX→ Auxiliary deviceCOM1→ Serial communication portLPT1→ Parallel printer port
Because these names are internally linked to hardware and system functions, Windows reserves them to avoid conflicts and confusion within the operating system.
What Would Happen Otherwise?
If Windows allowed users to create folders with these names, the operating system could become confused between an actual folder and the system device associated with that name.
For example, when a program sends data to PRN, Windows understands that the data should go to the printer. If a normal folder named PRN also existed, the system would not know whether to send the data to the printer device or the folder.
To prevent such ambiguity, Windows blocks these names completely.
Conclusion
This is one of the most interesting legacy features carried over from DOS into modern versions of Windows. Even today, these reserved names remain protected by the operating system for compatibility and system stability.
Hope you found this Windows fact interesting.
Comments
Post a Comment