Windows won't let you name a folder "CON" because of this 45-year-old quirk

Windows won't let you name a folder "CON" because of this 45-year-old quirk

Published Nov 9, 2026, 12:30 PM EST Steve has been editing and writing content for almost two decades, including product reviews, tech news, how-to guides, and even lifestyle and health topics. He’s served as chief editor for publications like Tech Junkie and Alphr, and has written and edited content for many other tech-related sites. His expertise in Windows, Android, iOS, Mac, and Linux simplifies the gadget and computer world for others, enabling them to shop, connect, learn, tweak, and optimize devices and software to suit their needs. When he’s not writing or editing content, he enjoys repairing and optimizing devices (and game consoles), watching movies, golfing, and spending time with the family. Sign in to your How-To Geek account Microsoft has been around for decades, dating back to 1975 with its BASIC software. BASIC was written for the Altair 8800 microcomputer built by MITS (Micro Instrumentation and Telemetry Systems). Bill Gates and Paul Allen created the software when MITS approached them, needing a programming language for their personal computers. Back then, the brand was referenced as Micro-Soft in a letter from Bill Gates to Paul Allen. The brand had not been established yet. After Altair’s personal computer success, Bill and Paul were approached by IBM in 1980 to provide an operating system for their upcoming IBM PC. Micro-Soft acquired licensing for QDOS/86-DOS from Seattle Computer Products and went on to rebuild it as PC-DOS for the new IBM personal computer. They later renamed it to MS-DOS to sell to other PC manufacturers, but DOS 1.0 was officially released in 1981 on the IBM PC. This is where the reserved CON name restriction got started, and it’s been there ever since. Blocking CON wasn’t a random thought — it was mandatory The real reason you can’t name a file or folder CON in any form DOS 1.0 couldn’t have subfolders, but it did have device filenames, and CON was one of them. CON is short for Console, which represented the keyboard and screen. Starting in 1981, device names behaved like files, so typing CON would send data/instructions from a coding assembler to the screen rather than creating a file on the computer. It was much different than Windows command capabilities today. A program could also use CON to capture keyboard inputs or screen outputs. Therefore, you couldn’t create a file with the same name. In programming terms, CON was used in assembler instructions to save to or read from CON devices (the keyboard’s input and the screen’s output), so you couldn’t naturally create a file with the same filename and tell it to read or write there. It saved to the screen instead. The odds of needing the name CON were bigger back then Simple names and limited characters With no GUI and just basic terminal coding, programs and commands in the 1980s were fairly primitive. Filenames were also limited to 8.3 characters, which is why a file or folder name like CON was more likely to occur, so the system denied it. Since there were no subfolders, everything was basically files and device names in one directory, all living in one location. You couldn’t have a folder structure like C:\Windows\Users, so you couldn't repeat a name if you tried. Aside from the reserved CON name and the single-directory structure, DOS 2.0 introduced folders and subfolders. This created more issues because files and folders were everywhere. A code assembler calling CON could fail if it was running within a folder. That’s when Microsoft made it so that the device name (CON) could be read from all folders and subfolders, which is also why you cannot name a file, folder, or sub-folder CON. It could confuse the system and crash it. In 1985, the first Windows release (Windows 1.0) came out. The odds of needing to name a file or folder CON were lower, but Microsoft still kept it restricted for backward compatibility. Naming a folder or file isn’t restricted to just CON — here are other blocked device names More names meant more restrictions Sure, CON is one name you can’t use, but several others are blocked as well. As more system/hardware devices were added to PCs, more device names became reserved for various inputs, including printers, serial port devices, auxiliary devices, and more. At this point, you still had no GUI and only terminal coding, like MS-DOS with the still-used chkdsk command, created by Tim Paterson in his 86-DOS software. But the device/hardware name restriction continues today, even though most device names aren't used the same way anymore. According to Microsoft, you can’t use these system/hardware device names: CON Console (keyboard input and screen output) PRN Printer (default main printer) COM0 Component Object Model — Non-DOS Virtual Serial Port (specialized device drivers and virtual serial port emulators) COM1-COM9 Component Object Model — Serial Ports (modems, terminals, mice, etc.) AUX Auxiliary (not audio-related) — Text input/output (terminals, older printers/modems, multimeters, oscilloscopes, other serial/parallel text-related devices before multiple COM ports existed) LPT0 Line Printer Terminal — Non-DOS Virtual Printer Port (software emulators, specialized network print monitors, etc.) LPT1-LPT9 Line Printer Terminal — Physical Parallel Printer Ports (scanners, printers, etc.) NUL The "trasher" (Silently discards any data sent to it) COM0 and LPT0 are not physical hardware names, but Microsoft claims they are reserved. Creating those folder names fails in Explorer and OneDrive but works fine in the Command Prompt with a standard 'md' command. Still, use them with caution because drivers or software can create a virtual COM0 or LPT0 port, which can cause issues with accessing the named folders or files. Trying to name a file or folder with superscript digits (LPT¹, LPT², COM¹, COM², etc.) rather than normal ones still gets blocked or renamed. Creating one with an extension after the name (COM.txt, NUL.txt, AUX.exe, etc.) may work in some scenarios (Windows 11), but then the system may not be able to read that file or folder, or even write to it. Capital and lowercase combinations (com, COM, Com, prn, PRN, Prn, etc.) also get blocked. The unique way Windows restricts device names today You can’t touch this — the hammer is still down DOS used the device filenames to talk to hardware, but Windows uses .NET assemblies, UWP/WinRT (sandboxed applications), and WebView2. Even though CON and other device names aren't used directly anymore, some apps still need to use CON to support older devices and systems, like older industrial control systems, PC games, business equipment, and medical equipment. Many legacy apps still depend on it, so it must remain available. Windows blocks the names using the Win32 API subsystem layer. It’s not in the storage drives or the kernel. When you try to name a file or folder CON, or another device filename, or any variant of it, Win32 sanitizes (removes extensions, spaces, periods, etc.) and validates the path. After that, it checks for any hardcoded, reserved names. The same process occurs whether you are using Windows Explorer or a Windows program to name your file/folder. After checking the stripped-down name (CON) against hardcoded, reserved names, Win32 tries to route it to the Object Manager namespace (kernel-managed data hierarchy that organizes the system resources like devices, registry keys, files, and more). It’s essentially the resource broker for the system. Since the Object Manager detects a reserved name, Windows routes the name to the hidden virtual directory (\??\ or \DosDevices\) which exists for compatibility reasons. This directory contains symbolic links that map CON, or any other device name, to the kernel drivers. Win32 interprets the raw data and processes the intended instruction, which in this case is the NT object path ‘\Device\Console.’ Because Windows tries to create the file or folder and passes the name to the hardware driver (Console), it returns an error. Otherwise, it could crash the system or cause it to freeze when Explorer or any program calls that file or folder. Can I bypass the CON or device name restriction to use it as a file or folder name? You can bypass it, but you may not want to You can actually bypass the Windows validation process, but it will cause the system to freeze or crash whenever you or any Win32 app calls that name. It will successfully write the filename or folder to your partition when adding \\?\ as a prefix, but when something needs it, the system will most likely crash. Because Windows skips validation with the above prefix, it routes directly to the filesystem and adds it. But good luck when you need to access that file or folder. The application (Explorer or any program or script) does not skip the validity check and will still try to forward the call to the device name. Use at your own risk. I strongly suggest that you back up your entire Windows partition before attempting this test. If you want to test it, you have to use the Command Prompt and type something like mkdir "\\?\C:\Users\YourUsername\Documents\CON" in the prompt. The ‘\\?\’ tells it to bypass the validity check so that it still writes the name to the directory. To remove it, you need to type rd "\\?\C:\Users\YourUsername\Documents\CON" in the prompt. But I wish you luck on that adventure when Explorer or any app tries to access or move it. Windows may evolve and change, but device names must stay reserved for backward compatibility When DOS 1.0 began, and code assemblers called a hardware device (PRN, NUL, COM1, etc.), it was before folders and subfolders were added with DOS 2.0. Even then, those names had to remain reserved so the computer knew where to read from or write to. But today, some names are still used, like NUL in C+ and C++, Excel, and POSIX, plus PRN in DOS and legacy software. It’s not often you’d need to name or rename a file or folder CON now, but for those who use abbreviations where CON fits, you’ll have to come up with something else, as well as other device names like PRN, COM, COM1-COM9, AUX, LPT, and LPT1-LPT9.

Original Source

Read the full article at Howtogeek →

KhanList aggregates and links to publicly available news content. We do not host full articles from third-party sources. Always verify important information with original sources.