Why Can't You Name A Folder CON On Windows?
Windows still refuses folders named CON, PRN, AUX or NUL, because MS-DOS reserved them for devices in the 1980s.
The script
Try naming a folder con on Windows... it won't let you.
Windows just says the device name is invalid.
You see, in the early nineteen eighties, em ess doss gave a few names a special job.
Con was the console. P R N was the printer. Then aux, null, and the ports.
Use one of those names, and doss didn't make a file... it talked straight to the device.
Windows never dropped them, because thousands of old programs still used them.
So forty-five years later, your computer is still protecting a printer from the nineteen eighties.
Go on...
The facts, checked
- Windows reserves CON, PRN, AUX, NUL, COM1–COM9 and LPT1–LPT9, case-insensitive. These are MS-DOS device names (CON is the console, i.e. keyboard and screen; PRN is the printer; NUL discards everything).
- Windows keeps them for backward compatibility. The Win32 path layer (Explorer, PowerShell, .NET) refuses them; NTFS itself doesn't.




