0

Before you start complaining about me not googling the answer - I did Google search it.

But everything I could find was that CON, COM1, AUX, etc are restricted because they have special meaning - for example, "CON:" mens console. And therefore writing to CON: will result in the text popping up in the console (checked that myself - typing echo "asdf" > CON: indeed resulted in "asdf" showing up).

For me, this still hardly answers the question. I mean, CON: should be something different that "C:\CON" or "C:\CON.txt", shouldn't it? As far as I know, any file or folder or driver on anything is being fully identified by the string containing it's full location (including the drive followed by a : sign at the beginning) and (optionally) it's type extenstion. Therefore I can't see how, for example, the existance of a file "C:\Documents and Settings\Someone\Desktop\c.docx" could result in any ambiguity, as it should be obvious that this Word document is not the C: drive. And similary I can't see how the existance of "C:\Documents and Settings\Someone\Desktop\con.docx" could result in Windows not knowing whether this is a Word document or the console.

Could someone explain this to me? Thanks in advance.

1 Answers1

0

A document can be minimally referred to by its filename only. When this happens, the OS will assume that the file is in the current working directory. In other words, while it's perfectly OK to fully qualify the file path (drive/directory/filename), it's also OK to enter just the filename. DOS didn't support subdirectories until DOS 2.0, but all version of DOS had CON.

CON was often used for file input. Typing COPY CON filename in DOS and Windows allows the user to type a series of text - hitting CTRL/Z or F6 would then copy the text into the file with the name filename.

Roger
  • 1,447