Computing.Net > Forums > Windows 95/98 > Weird question...

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Weird question...

Reply to Message Icon

Name: lalala
Date: April 13, 2003 at 11:55:27 Pacific
OS: 98
CPU/Ram: 500/256
Comment:

Try renaming a file or folder to "con". Windows wont let you...why?



Sponsored Link
Ads by Google

Response Number 1
Name: Dennis
Date: April 13, 2003 at 12:12:31 Pacific
Reply:

Easy one who is the owner of Microsoft.


0

Response Number 2
Name: XLWH
Date: April 13, 2003 at 12:14:45 Pacific
Reply:

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


0

Response Number 3
Name: mesich
Date: April 13, 2003 at 12:54:09 Pacific
Reply:

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

Take care,
Mesich


0

Response Number 4
Name: johnoh
Date: April 13, 2003 at 14:04:44 Pacific
Reply:

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



0

Response Number 5
Name: Aldo Zeolla
Date: April 13, 2003 at 15:16:40 Pacific
Reply:

cool. You learn something new everyday


0

Related Posts

See More



Response Number 6
Name: mesich
Date: April 13, 2003 at 16:18:57 Pacific
Reply:

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


0

Response Number 7
Name: sekirt
Date: April 14, 2003 at 00:56:37 Pacific
Reply:

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



0

Response Number 8
Name: Ronnie Ratt
Date: April 14, 2003 at 05:14:43 Pacific
Reply:

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 !



0

Response Number 9
Name: johnoh
Date: April 14, 2003 at 18:36:02 Pacific
Reply:

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.


0

Response Number 10
Name: sekirt
Date: April 14, 2003 at 23:58:06 Pacific
Reply:

Just quoting from: Your IBM PC Made Easy

Device name: CON
When used as input device: Keyboard
When used as output device: Screen

That 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.


0

Response Number 11
Name: sekirt
Date: April 15, 2003 at 00:02:22 Pacific
Reply:

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


0

Sponsored Link
Ads by Google
Reply to Message Icon

Creative Audigy 2 How do I do a backup?



Post Locked

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


Go to Windows 95/98 Forum Home


Sponsored links

Ads by Google


Results for: Weird question...

windows boot logo www.computing.net/answers/windows-95/windows-boot-logo/162094.html

Need Cable www.computing.net/answers/windows-95/need-cable/18540.html

hope for help www.computing.net/answers/windows-95/hope-for-help/158608.html