Ob Windows 7, Windows 8.1, Windows 10 or older system variants: Microsoft operating systems are not picky about file and folder names. The maximum number of characters is limited, which is what the NTFS file system (New Technology F.ile S.ystem), otherwise Windows accepts almost all file and folder names. However, some names are not possible: If you try to name a new or existing folder “CON”, the error message “The specified device name is not allowed” appears. We unravel the phenomenon.
Note: We have tested the following under Windows 7 (Service Pack 1), Windows 8.1 and Windows 10 in version 2004 (May 2020 update) – i.e. with the Microsoft operating system that was current at the time of the article update.
Relic from the past
It is justified in the past that some file or folder names cannot be assigned. In the DOS days, when Windows did not yet have a graphical user interface, certain terms were reserved for Windows and devices – and although this is no longer necessary today, name locks remain a relic. Not only CON, but also “NUL”, “AUX”, “PRN” and “COM0” to “COM9” and “LPT0” to “LTP9” are prohibited. Upper and lower case does not matter, for example neither “con” or “CON” (without further ado) is possible as a file / folder name. And file endings are irrelevant, for example you fail with the editor when creating a con text document: If you type “con” in the file name field in the save as dialog, Windows would save the object as “con.txt” without the restriction; however, an error message that differs from the renaming appears: “This file name is reserved for Windows. Choose a different name and repeat the process.” (You will receive this message regardless of your upper or lower case.)
Create a CON folder using a trick
If you want to create a folder whose name is actually not possible, you use a trick: Open the command line, for example with the Windows key and R. and the command cmd. For example, to create a folder named CON on the C partition (top hierarchy level), enter md . C: CON and press Enter. In principle, such a folder is rather useless: you cannot open files stored in it; because opening the folder fails or double-clicking on the files in it brings up an error message. Furthermore, removing the folder fails, for example with a right-click and the context command “Delete”.
Delete the CON folder
Whether created by yourself or by a joker: If there is a supposedly indelible folder on the hard drive or SSD, you probably want to get rid of it. To do this, call up the command line as described above. The appropriate delete command for the partition C folder from the example above is rmdir . c: CON – confirm it with the Enter key. If necessary, modify the command if the storage location and / or the name of the useless directory to be removed is different. If there is a NUL folder on the desktop that you want to delete, type in (the user name is teddy and should be modified in your case):
rmdir . c: users teddy Desktop NUL
Against annoying crashes, junk data and much more
Can be created and deleted via live CD
The creation and deletion of corresponding files and folders works alternatively with the help of a Linux Live DVD: Start the PC from it, do not work under Windows – and thereby intervene in the Microsoft system without restrictions. An Ubuntu Live OS, for example, doesn’t care about Windows name aversions. However, files or folders with protected names do not offer any real advantages, at most the technical feasibility of creating (including removing) could be irritating.