File/Folder name 'error'?

Status
Not open for further replies.

inflames

Baseband Member
Messages
44
Greetings everything,

I passed by something weird today, I'm running windows XP (professional edition) and I tried naming a folder "con" but the file name didn't change to "con", same thing happened when I tried naming anything "con" so I was wondering if anyone can help me know WHY nothing can't be named "con" ?

Thanks, in advance. ^_^
 
Re: file 'con.model' exists when it doesn't
Author: edsonw Posts: 3,049 Registered: 18/06/98
Aug 6, 2004 5:53 AM (reply 3 of 3)


The following file names in Windows are "reserved" because they represent devices:
con, con.* -> the console
prn, prn.* -> the default printer, as a character device
aux, aux.* -> the default serial terminal, as a character device
lpt1, lpt2, lpt3, lpt4, lpt5, lpt6, lpt7, lpt8, lpt9 -> the parallel ports, as character devices
lpt1.*, lpt2.*, lpt3.*, lpt4.*, lpt5.*, lpt6.*, lpt7.*, lpt8.*, lpt9.*
com1, com2, com3, com4, com5, com6, com7, com8, com9 -> the serial ports, as character devices
com1.*, com2.*, com3.*, com4.*, com5.*, com6.*, com7.*, com8.*, com9.*
nul, nul.* -> the NUL or "waste bit bucket" or "black hole for bits" or "/dev/null" device

Such files are considered to "exist" in all directories, so if you have a filename like "c:\temp\con", you're talking about the CON device, not about a normal disk file called "con". They're not listed using the "dir" command, or using APIs.

This is an inheritance from good old DOS days. (In Unix such files are placed in the /dev directory...)

You can have a normal file named "conX", but the file "con.X" is considered as the console.
 
inflames said:
Greetings everything,

I passed by something weird today, I'm running windows XP (professional edition) and I tried naming a folder "con" but the file name didn't change to "con", same thing happened when I tried naming anything "con" so I was wondering if anyone can help me know WHY nothing can't be named "con" ?

Thanks, in advance. ^_^

why would you want to name something con?
 
why would you want to name something con?

I didn't really want to name it CON exactly, but I pressed enter by mistake when I wrote 'con' and it caught my attention, the file name was actually "consolidated statements' :p
 
Status
Not open for further replies.
Back
Top Bottom