« Another Case For Intrinsic RedshiftsSam Brownback »

Revenge of DOS

02/03/06

  01:28:10 am, by Nimble   , 225 words  
Categories: Thoughts, Programming

Revenge of DOS

A coworker of mine brought something to my attention. We were informed of trouble in testing one of our pieces. Funny... it had always been working. The test was construction related, and our tester had put in "con" (short for "construction") as a test user name...and it blew a small gasket.

If you used another user name, no problem. So what gives?

It was encountering an error making a directory. Hmmm? Privileges? What? Well, it was making a directory corresponding to this particular user name, C:\Blablabla\inbox\con. That failed.

Then it struck him, and it may strike some of us "old-timers". "con" is a device name from DOS days. It still functions. You can go Start->Run cmd [ENTER] then type:

COPY CON C:\MEEP.TXT [ENTER]

You can then keep typing until you hit Ctrl+Z, and what you typed will end up in MEEP.TXT.

Funny that in this day and age, you can't name a directory 'CON'.

Go ahead and try it (if you have a Windows machine) - make a new folder anywhere, and try to rename it as "con".

Other things you cannot name the folder: "nul", "lpt1" (or lpt plus any number), "aux", "com1" (or com plus any number). As an old-timer, I understand why: these are reserved system device names. Just kinda surprising/funny is all :)

No feedback yet