Question:
why we cant create a folder with a name "con" in our windows based computer?
mohit_agg_2000
2006-12-03 01:03:27 UTC
why we cant create a folder with a name "con" in our windows based computer?
Four answers:
Crazydog
2006-12-03 01:06:02 UTC
It's not that weird. 'con' is a reserved word from the old DOS days, simply meaning 'console'. If you wanted to create a new text file in DOS you could type 'copy con newfile.txt' meaning copy from the console to newfile.txt. This would let you type some lines and when you ended the file with ^Z (DOSish for 'end of file') you would have a file called newfile.txt containing whatever you wrote in the console. This is indeed still possible in the Windows XP console, and can you see what mess it would cause if you let files or folders have the name 'con'? What would 'copy con newfile.txt' then mean? BSOD?



List of other DOS devices that can't be used as folder names:

CON, PRN, AUX, CLOCK$, NUL, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, and LPT9.
computerguy103
2006-12-03 09:19:45 UTC
The names con, prn, and nul are reserved - none of them can be used as names of files or folders. They are used, in DOS, for piping and redirecting input or output. So you can do the following:



copy con newfile.txt

This will create a file, newfile.txt, and begin accepting input from the console. Anything typed will be copied into the file. Pressing Ctrl-Z and Return will end the file.



copy newfile.txt prn

This will send the contents of newfile.txt to a printer.



copy oldfile.txt newfile.txt > nul

This will create a new copy of oldfile.txt called newfile.txt, but the output message, "1 file(s) copied", will be supressed. It will be actually be piped to nul, which silently discards it. Note that the "Overwrite newfile.txt (Yes/No/All)?" confirmation prompt would still appear if newfile.txt existed, because the prompt is sent to the console, not to the standard output device (which we set to be nul). If you wanted to supress that prompt as well, you would have to use the /Y switch.
2006-12-03 09:55:09 UTC
Here is the answer:



http://www.helpero.com/Questions-and-answers/Computers/Windows/Why-can-t-I-create-a-folder-with-the-name-con_3195.html



Helpero is a web site that helps every Internet user, from all over the world, solve any computer related problem.
2006-12-03 09:09:40 UTC
The name "CON" is reserved for writing to the CONsole (i.e. the screen), and so cannot be used for a user file- or folder-name


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