5 ms·
When I used Windows, I remember you couldn't create folders named "con", for compatibility reasons. It kind of sucked because it means "with" in Italian, and I
by nkkollaw 8y ago
When I used Windows, I remember you couldn't create folders named "con", for compatibility reasons.
It kind of sucked because it means "with" in Italian, and I often could have organized files within "with"/"without"subfolders.
- kingaillas 8y agoThat's just one of the many reserved file/device names in Windows! "Do not use the following reserved names for the name of a file: CON, PRN, AUX, NUL, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, and LPT9." [0] [0] https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx https://msdn.microsoft.com/en-us/library/windows/desktop/aa3...
- cesarb 8y agoNote, they are not just reserved names, they are reserved names with any extension. So when a Unix user checks in a file named "aux.c" to your project, it will cause problems for Windows users.
- deleted 8y ago[deleted]
- aksss 8y agoCon was short for console, I think. “Copy con:test.bat” was a quick way to create and fill out a batch file provided you could write it error-free in one go.
- rbanffy 8y agoIt's appeal is mostly you didn't need to use `edlin`.
- marcofatica 8y agostill works on win10! and you can backspace, but only the current line, so don't press enter until you're really sure
- gourlaysama 8y ago> [...] for compatibility reasons. For compatibility with DOS 1.x no less [0]! That's 37 years and counting of backward compatibility... [0] https://blogs.msdn.microsoft.com/oldnewthing/20031022-00/?p=42073 https://blogs.msdn.microsoft.com/oldnewthing/20031022-00/?p=...
- xenadu02 8y agoDOS originally had no directories. When they were added Microsoft could have chosen to put special devices in their own directory (eg C:\dev on each device, or reserved D: for devices, or any number of other schemes). Instead they decided to make these special device names be implicit members of every directory on every drive. Similar to make treating whitespace as significant, the decision to be compatible with the relatively few existing users doomed many, many more users in the future to endless problems. Backwards compatibility has a non-zero cost to users too!
- AnIdiotOnTheNet 8y agoIt's a bit before my time, but I imagine that would have broken comparability with some CP/M programs that wouldn't be aware of the concept of directories and would look in cwd. Given the era we're talking about, that seems like it'd actually be a pretty big deal. Until relatively recently, Microsoft was big on backward compatibility and it was probably a pretty significant factor in their rise to dominance.
- rbanffy 8y agoOn CP/M, device names ended with ":". To me, it'd be perfectly reasonable to treat "LPT:" as a magical file present in any directory, but not "AUX" or, much worse, "aux.c", which doesn't look like a device name. Besides that, "AUX:" was never a thing in CP/M IIRC. That doesn't convince me they actually thought this through at the time.
- jacobush 8y agoThey still are big on backwards compatibility
- da_chicken 8y agoYeah, CON is a device name (console), like LPT1, COM1, PRN, or NUL. See: https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx#naming_conventions https://msdn.microsoft.com/en-us/library/windows/desktop/aa3... An old DOS trick to create a file is to run "copy con newfile.txt" and hit enter. Then you can start typing the file's contents. I don't recommend trying to use backspace or delete since it doesn't always work like you think, depending on your shell. When you're done, hit F6 or Ctrl+Z followed Enter. It still works in cmd.exe. Similarly, you can create an empty file with "copy nul newfile.txt" or test copy a file with "copy filename.txt nul".
- inferiorhuman 8y agoLet's not forget this one: http://sasheldon.com/blog/2017/05/07/how-i-broke-cargo-for-windows/ http://sasheldon.com/blog/2017/05/07/how-i-broke-cargo-for-w...
- rzzzt 8y agoTyping "C:\con\con" into the run dialog bluescreened Windows 98 (the article is about a similar issue with the NTFS driver from yesteryear): https://arstechnica.com/information-technology/2017/05/in-a-throwback-to-the-90s-ntfs-bug-lets-anyone-hang-or-crash-windows-7-8-1/ https://arstechnica.com/information-technology/2017/05/in-a-...
- rbanffy 8y agoI have to try that. :-)
- garaetjjte 8y agoIt is possible using \\?\ prefix, eg. \\?\C:\con.txt is valid path. Unfortunately these files anyway confuse many applications that don't use this prefix, including Explorer.