Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hi lalala.
Microsoft says it is one of the reserved device names and can't be used for naming a file.
The following reserved device names cannot be used as the name of a file:CON, PRN, AUX, CLOCK$, NUL, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, and LPT9. Also avoid these names followed by an extension (for example, NUL.tx7).
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/base/naming_a_file.asp
Take care,Linda

Very nice Linda. Gotta learn something new everyday and you just fulfilled today's quota! :)
Take care,
Mesich

con is short for console. Dos & windows don't want to get the console (monitor) confused with a file so that's why con is an unallowed file name. For instance, in DOS you can type
copy t.t r.r
and the contents of t.t will be put into a file called r.r. But if you type
copy t.t con
the contents of t.t will be shown on the monitor

Johnoh,
That's two things in one day!
You have exceeded the quota. I am starting to get low memory errors and it's not on my computer. :)
Thanks for the info, it's always appreciated.
Mesich

Time to mess it up a little. It is a DOS
thing but....CON means keyboard also. When it is used as
an input device, it is the keyboard.When used as an output device, it is the
screen. That is the example given by johnoh.An example of using as an input device is creating a BATCH FILE in DOS without using an editor.
C:\>COPY CON any.bat
If you were to type that, the cursor moves
to the next line. At that point you type
your actual batch lines and at the end, you
type CTRL-Z. (That indicates end of file).
And you would then find sitting on your C:\
drive, a BATCH file called: any.bat
sekirt

I actually tried to name a folder to 'con' several weeks ago and got the error message about the name being used, also 'prn' was one I discovered long ago.
In XP it says nothing at all, just keeps going back to New Folder/New Text Document.txt etc...
Didn't know about the rest that Linda has listed but will copy them to avoid any further hassle.
So now that little mystery that I couldn't figure for years has been solved.
Well done Linda !

Actually sekirt con means monitor even when you're using the keyboard as you outlined. It just happens to be the keyboard that is putting those characters on the monitor before they go into the file due to pressing F6 or ctl-z.
If it was the keyboard doing the input the sequence "1234- backspace - backspace" would appear in the file as 1234 plus the scan codes for two backspaces, but what actually ends up in the file is "12", which is just what shows on the monitor.

Just quoting from: Your IBM PC Made Easy
Device name: CON
When used as input device: Keyboard
When used as output device: ScreenThat was in a matrix chart, which I can't
show here...but those are the explanations.
-----------
All COPY CON can really do is copy
characters from the keyboard to a file.
COPY CON creates absolutely pure ASCII
characters, without any embedded codes,
except to indicate end of file. The only
real editing is to erase mistakes with the
backspace or arrow key.

There is weird for you.
In my last post(10), that "P" "C" wasn't meant to be a live link. It showed up that way by itself. Must be a computing.net thing with Intel.sekirt

![]() |
Creative Audigy 2
|
How do I do a backup?
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |