4 ms·
The sad thing is Microsoft never wanted the backslash. It's all IBM's fault. DOS 1.0 had no subdirectories. There was no slash: you didn't type A:\FOO.TXT, you
by TazeTSchnitzel 11y ago
The sad thing is Microsoft never wanted the backslash. It's all IBM's fault.
DOS 1.0 had no subdirectories. There was no slash: you didn't type A:\FOO.TXT, you typed A:FOO.TXT, and the prompt wasn't A:\>, but rather A>. Incidentally, this still works today, and sometimes DOS boots with a A> prompt.
In DOS 2.0, Microsoft decided to add UNIX-style directories, with . and .. for navigation, / as the separator, cd to change directory and so on. But there was a problem.
DOS 1.0 had used / for flags (e.g. DIR /W). Microsoft's solution to this was to switch to - for flags, but IBM didn't like this change. So Microsoft compromised on using \ as the directory separator and kept / in use for flags.
However, Microsoft clearly didn't like having to make this change. How do we know this? Well, DOS nonetheless also supported / for directories (and thus its successors, including Windows NT do), and, at least for a little while, contained a setting which let you use - as the flag character.
- wolfgke 11y agoA more detailed representation of this topic: http://www.howtogeek.com/181774/why-windows-uses-backslashes-and-everything-else-uses-forward-slashes/ http://www.howtogeek.com/181774/why-windows-uses-backslashes... P.S.: VMS/OpenVMS, which was designed by David Cutler (the same guy who later designed Windows NT after he was poached by Microsoft), used . as directory separator (https://en.wikipedia.org/w/index.php?title=Files-11&oldid=680322555 https://en.wikipedia.org/w/index.php?title=Files-11&oldid=68...)
- zippergz 11y agoI used VMS for a while (I never became a power user), and it always felt really weird to me. But I'm not sure if it actually IS weird, or if it just seemed that way because I was already so familiar with Unix. On the one hand, directory separation characters are kind of arbitrary. But my brain insists that "/" is more natural than . (or ":" on MacOS).
- bbatha 11y agoWell VMS also had this nonsense for fully qualified paths, NODE"accountname password"::device:[directory.subdirectory]filename.type;ver everything except filename.type is optional based on the users current DEFAULT (pwd in unix parlance). And required extensions and used the "." separator making it overloaded and confusing to read at a glance. Edit: forgot a few parts of the qualified path.
- simula67 11y agoComments in TFA also links to an official source https://blogs.msdn.microsoft.com/larryosterman/2005/06/24/why-is-the-dos-path-character/ https://blogs.msdn.microsoft.com/larryosterman/2005/06/24/wh...
- wolfgke 11y agoThanks, this was the article I was originally looking for.
- agumonkey 11y agoFunny, I knew MS used / before but didn't knew that IBM was the reason for the switch.
- watson 11y agoMS didn't use / for directory separators before. They wanted to in DOS 2.0, but that would mean they had to change / in front of options to something else. So to keep backwards compatibility they used \ instead. It's true that they were ok with breaking that backwards compatibility, but IBM convinced them not to