Jun 05 2007
Reserved filename in Windows
I just found out, you can’t create a file/directory named “con” on windows. I thought I was going crazy for a second there.
Just try it! It won’t work. Does anyone know why though?
Jun 05 2007
I just found out, you can’t create a file/directory named “con” on windows. I thought I was going crazy for a second there.
Just try it! It won’t work. Does anyone know why though?
June 14th, 2007 at 1:15 am
Sorry I should elaborate upon that, the idea was that if you were in a really dire situation in dos you could cobble the system together with something like…
C:\>copy con autoexec.bat
@echo off
prompt $p$g
lh mouse
(then press [f6] or [ctrl]+[z] to generate the “Z^”, and press [enter])
And it would create a text file. So as long as you still had command.com, you could always print, create and read text files. Saved my hide more than once.
Also you could type “copy con prn” to turn your computer into an overpriced typewriter :-p
November 15th, 2007 at 4:32 am
Thanks!
January 28th, 2008 at 2:48 pm
con is reserved for console which means your keyboard and monitor.
try:
C:\> copy filename con:
this will display the contents of the file.
February 17th, 2008 at 3:12 pm
There are a few reserved keywords. con, prn, aux. It’s what caused the con/con DoS back in the 90’s :)
February 22nd, 2008 at 1:06 am
The other keyword that you can’t create the folder with are: -
PRN- refers printer
NIL - refers void
AUX - refers to the auxilary device
COM1 - COM 1 port
COM2 - COM 2 port
COM3 - COM 3 port
COM4 - COM 4 port
LPT1 - LPT 1 port
LPT2 - LPT 2 port
LPT3 - LPT 3 port
etc …
February 22nd, 2008 at 1:39 am
awesome! thanks guys