Exüberance wrote:Why would you use the standard escape character as a folder seperator? Wwwwhhhhhyyyy?
Someone told part of this story, but left out an important detail.
The slash character was used for "option switches" in operating systems from DEC (Digital Equipment Corp) at least as far back as the 1970s. DEC was huge back in the 1970s and 1980s, so lots of people were familiar with that.
(The slash (/) is still used for options in DEC VMS today. (VMS uses a syntax that now seems weird for file paths: DISK:[DIR.SUBDIR.SUBSUBDIR]FILE.EXT;1
(1 is the file version).) But I digress.)
(Microsoft has been heavily influenced by DEC. Any time you see a dollar sign in a file name or a reserved word, that's DEC influence. Windows NT (which 2000/XP/Vista/etc descend from) and DEC VMS were designed by the same person, and NT borrowed so much from VMS that DEC sued Microsoft. They settled out-of-court. It has been claimed this is the major reason Windows NT used to support the DEC Alpha. But again, I digress.)
So anyway, as has been mentioned, MS-DOS 1.0 did not support directories. But it did support option switches. So they chose the DEC method, since that was as good as any other. Making the switch character a reserved character does have certain advantages when it comes to command line syntax. (Unix has evolved the bare "--" convention, but it's inconsistently implemented.)
When MS-DOS 2.0 wanted directory support, they had to choose something. They chose backslash, for whatever reason. The issue of backslash (\) being a special character in things that came from Unix (C, Tex, etc.) was unlikely to be a big concern for people used to DEC and IBM systems, and doing most of their programming in assembler. Backslash was just an odd-ball, rarely used character. Perfect choice for a directory separator.
Years later, everybody regrets this turn of events, but I don't blame Microsoft for not being psychic. They had no way of knowing C and C-derived languages would come to dominate the world. Back in the early 1980s, Pascal was still a viable programming language, for crying out loud! (Trivia: VMS and the classic Macintosh OSes both implement significant chunks of code in Pascal.)
MS-DOS 2.0 even had the "SWITCHAR" directive, which would let you change the switch character to dash (-), and the directory separator to slash (/). But it was so little-used almost nothing outside the OS supported it -- even other Microsoft software.
TheoGB wrote:However, broadcasters are always saying 'forward slash', which irritates the hell out of me. It's a SLASH, that's what it is: you don't have to clarify it with forward.
Obviously, you do have to clarify it, or we wouldn't be having this discussion.
I'm not surprised people who don't deal with computers for a living confuse (forward) slash (/) and backslash (\). If you're not a machine, they're practically the same thing.
keithc wrote:I don't think they had redirection in the first versions of MS-DOS that had directories. Not sure about . and .. though
MS-DOS 1.0 did not support subdirectories, nor redirection. So comesfrom (<), gozinta (>), and pipe (|) were not special syntax, and . and .. would have served no purpose.
MS-DOS 2.0 introduced support for subdirectories and hard disks, and, I think, redirection.