Re:MS Teams channels cannot contain MS-DOS device names
by dharmab on Thursday August 10, 2023 @10:55AM
(#37076947)
The Something Terrible in this case is early DOS which did not have separate folders. So the device files were in the same namespace as the user's files, so the user couldn't name a file CON or LPT1. These are preserved for backwards compatibility. To this day you can write a program that writes to a CON file in any folder, and the program will print the write to console.
[ Parent
| on HN ]
Re:MS Teams channels cannot contain MS-DOS device names
by ChrisSD on Thursday August 10, 2023 @11:15AM
(#37077215)
This has actually changed a bit in the last few years. In Windows 11 writing to `.\CON` will write to the file but writing to `CON` will still write to the console.
Re:MS Teams channels cannot contain MS-DOS device names
by xp84 on Thursday August 10, 2023 @03:09PM
(#37080417)
Another interesting aspect of this, which I remember specifically from reading MS-DOS manuals in the 90s as a kid (I was an incredibly fun 12 year old) is that this choice was an intentional one done in the name of flexibility. These device names were correctly written with a colon, but you are allowed to omit the colons. For instance:
copy con lpt1
And
copy con: lpt1:
were interchangeable. If they’d chosen to not save users keystrokes and force colons when referencing devices, I’m not positive, but I think it would have eliminated the need for many of these reserved words in file names in general.
Also, side note, the “copy con outputfilename.txt” idiom is one that I still can’t ever remember how to do the equivalent on UNIX/Linux!
Re:MS Teams channels cannot contain MS-DOS device names
by gnosek on Thursday August 10, 2023 @04:41PM
(#37081489)
> Also, side note, the “copy con outputfilename.txt” idiom is one that I still can’t ever remember how to do the equivalent on UNIX/Linux!
cat > outputfilename.txt
Re:MS Teams channels cannot contain MS-DOS device names
by xp84 on Monday August 14, 2023 @12:44PM
(#37123160)
But it's not CTRL-Z to end, right? That's the part I forget every time :D
Re:MS Teams channels cannot contain MS-DOS device names
by Brian_K_White on Thursday August 10, 2023 @07:23PM
(#37083027)
One of my favorite bbs sig tags was "REAL programmers use COPY CON FILE.EXE"