Question:
why we unable to create folder name 'con' in windows?
arun kumar
2007-04-25 02:40:01 UTC
why we unable to create folder name 'con' in windows?
Seven answers:
geek_girl
2007-04-25 02:46:25 UTC




'con' is a reserved word that is used in Assembly language programming (Used to write low level computer programs). So in Assembly language if you want output to go to the screen, you would type "CON". You cant call a folder 'nul' either as that is another reserved word.



Well spotted! :o)



P.S. It happens in both XP and Vista!



Scorp _The_ Beast
2007-04-25 04:33:12 UTC
File names in Windows XP Professional can be up to 255 characters and can contain spaces, multiple periods, and special characters that are not allowed in MS-DOS file names. Windows XP Professional makes it possible for other operating systems to access files that have long names by generating an MS-DOS-readable (8.3) name for each file. These MS-DOS-readable names also enable MS-DOS-based and Windows 3.x?based applications to recognize and load files that have long file names. When a program saves a file on a computer running Windows XP Professional, both the 8.3 file name and long file name are retained.

CON stands for console. Old Timers like me ....will remember that there used to be a command called as "COPY CON " in Ms DOS. All it did was to create a file wiht the given name and used to take what ever text u typed as the contents of the file. Even now u can go to command prompt and try out the same.



Note



* The 8.3 format means that files can have between 1 and 8 characters in the file name. The name must start with a letter or a number and can contain any characters except the following:

* . " / \ [ ] : ; | = , * ? (space)

* An 8.3 file name typically has a file name extension that is from one to three characters long and has the same character restrictions. A period separates the file name from the file name extension.

* Several special file names are reserved by the system and cannot be used for files or folders:

* CON, AUX, COM1, COM2, COM3, COM4, LPT1, LPT2, LPT3, PRN, NUL





We can do this by following method

STEP1: goto command prompt

STEP2: type in prompt e:\> "mkdir \\.\e:\con"

STEP3: verify by typing "dir \\.\e:\con"

STEP4: delete the file or folder "rmdir \\.\e:\con"
planetmatt
2007-04-25 02:52:52 UTC
Con is a reserved word left over from the DOS days. It is short for Console and is not the only word you cannot use as a folder name. Aux, Prn, Conx, and Lptx (where x is a number) are also forbidden. All these words are actually destinations (com ports, printer ports, screen) that files can be copied to so to allow a folder to be named this could create confusion where the OS doesnt know whether a file is suppoed to go into a folder or to one of these destinations.
Big R
2007-04-25 02:51:54 UTC
That is true it must be a default folder name that Windows has reserved for itself for configuration files and so it doesn't conflict with any needed files they disallow the use of it.



I just tried to create one myself and it rejects (quite funny really) unless you have a name like Con then I guess it would be downright annoying
Subhasis G
2007-04-25 02:45:45 UTC
It is a reserved word in windows and MS DOS. THe word is reserved due to the command copy con that is existing in DOS.

Use copy con con

Then whatever you type will appear in the screen in the next line.

Then type controlZ enter to come out.

con is indicative of the input output.

Some other reserved words are lpt1, com1, com2 etc.
_Chetu_
2007-04-25 03:14:39 UTC
Try other like COM1 or LPT1 or LPT2 .. it reserved word in Microsoft Windows that you cannot use it anywhere.



This actually is a unix-like feature. DOS device drivers are accessible like normal files, i.e. the everything-is-a-file philosophy. CON is the equivalent of /dev/tty, NUL of /dev/null, COM# of /dev/ttyS#, LPT# of /dev/lp# and CLOCK$ corresponds to /dev/rtc (PRN is an alias to LPT1, AUX is COM1). Every character device can be opened this way, block devices (which are assumed to be FAT formatted...) are named A: to Z:, as you will know. Many pseudo character devices (drivers which had to be loaded as drivers but were no character devices, like EMM386, HIMEM.SYS, ..) had forbidden characters like '*' in their device names to be hidden from the user.





We can do this by following method

STEP1: goto command prompt

STEP2: type in prompt e:\> "mkdir \\.\e:\con"

STEP3: verify by typing "dir \\.\e:\con"

STEP4: delete the file or folder "rmdir \\.\e:\con"
CrazyCoder
2007-04-25 03:02:33 UTC
con is a key word for windows.

A file name cannot be a key word or reserved word and it should not be the name of an internal command also.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...