Creating Folder named CON : Why You Cant Create It And How To Create

Why we cannot create a folder named CON in Windows?

 


 

What is the reason for this? This is because these names represent the internal devices and hence we cannot create folders with the above names.
NOT BELIEVE?? You may try to create a folder and name it as “con”. In Windows XP the folder name will automatically changes back to “New Folder” no matter how many times you try. Whereas in Windows Vista or Windows 7 when you try to rename the folder or file to “con” you will get an error message “The specified device name is invalid”. Besides “con” you may also failed to create the following file names:-

  • CON
  • PRN
  • AUX
  • NUL
  • COM1
  • COM2
  • COM3
  • COM4
  • COM5
  • COM6
  • COM7
  • COM8
  • COM9
  • LPT1
  • LPT2
  • LPT3
  • LPT4
  • LPT5
  • LPT6
  • LPT7
  • LPT8
  • LPT9
This is because in MS-DOS, several special “device files” were available to aid in performing certain tasks, for example clearing the screen or deleting extraneous output from a program. In order to maintain backwards-compatibility, all versions of Windows up to Windows Vista and including new RTM (release to manufacturer) Windows 7 will refuse to allow you to create a file with these “reserved” device file names


Create a folder named “CON” in Windows :


Previous post mention that Windows does not allow to create a folder named “CON” in Windows because these names represent the internal devices. Today we going to used command prompt to create a folder name “CON” in Windows. Just a simple step to take, here we go:
1. Go to command prompt(Start–> All Programs–> Accessories–>Command Prompt) or (search “cmd” in Windows search)
2. Type in prompt (FOR EG. TO CREATE CON FOLDER IN D: DRIVE)
md\\.\d:\con
NOTE:”con” can be replaced by any other names such as “prn”, “nul” “com1″ “com2″ “lpt1″ etc.
3. To delete the folder use the following command
rd\\.\d:\con