Why file paths in MS-DOS and Windows use the “” character and not the “/” (as Microsoft developers wanted)
If you have used the Windows command interpreter or you comb gray hair and you used MS-DOS, surely you are clear that writing a path in DOS used the backslash or “”. An example would be “C: Users JaviPas Downloads xataka.png”.
The funny thing is that Microsoft chose that character to indicate the path to the file. Taking into account that Microsoft’s own developers wanted to use the normal slash (“http://feeds.weblogssl.com/”) that was used on UNIX systemsWhy did you choose the inverted one?
The normal bar was already taken, but Microsoft ended up accepting both
The history of that decision Larry Osterman told it on the MSDN blogs in 2005. The original post was lost, but it is possible to recover it via the Internet Archive and its (wonderful) Wayback Machine.
As explained there, it all started with DOS 1.0, the first version of the operating system that Microsoft prepared for IBM. At that time only floppy disks were supported, and curiously many of the utilities included with DOS had been developed by IBM, which used the character “http://feeds.weblogssl.com/” as a “switch” or “modifier” command.
So, if someone wanted to add a parameter to a command like DIR, they would do it with that normal bar. To get help from a command, for example, you would type (and keep typing) “DIR /?”. That same modifier it was also used in other operating systems of the time such as DEC.
On UNIX systems the modifier was not the slash, but the dash (“for example,” ls -la “), but when IBM designed how its commands work did not take into account the format used by those UNIX systems.
The problem came when it was necessary to support directories, something that was not even contemplated in DOS 1.0. With its second version, DOS 2.0, it happened that development had to align with the IBM PC / XT, which had a 10 MB hard drive.
This presented an opportunity for Microsoft developers, who had the opportunity to add support for modern filesystem APIs and also support for hierarchical routes.
That’s when they ran into the problem, because many of the DOS developers used Xenix machines (Microsoft’s UNIX) for your work and email management.
They were therefore very used to using the normal bar for those hierarchical paths that had been supported on UNIX systems for years, so they tried to apply them to DOS 2.0 through the normal bar (“http://feeds.weblogssl.com/ “), but they could not.
Why? Well because that normal bar was already taken and was used as the aforementioned modifier. It was thought of using the period (“.”) That for example was used in DEC systems, but that character was used to separate file names from their extensions. So that, they ended up choosing the backslash (“”) which was similar to the normal bar after all.
This is how that character became the one used by that version of DOS and then it would be applied to the rest of the versions, also coming to be inherited in all versions of Windows, including the current version, Windows 10.
Still, at Microsoft the developers cheated, because although the official notation makes use of the backslash, allowed the UNIX notation to be used with the normal slash to indicate file paths. You can test it in a command console or in the file explorer itself: it doesn’t matter if you write “C: Users JaviPas Downloads xataka.png” or “C: /Users/JaviPas/Downloads/xataka.png”, and the operating system converts normal bars to backslashes.
In fact, Osterman finally pointed out, too it became possible to use the Unix modifier in the Windows command interpreter: if we added the option “SWITCHAR =” we could set whether we want to choose the official character (“http://feeds.weblogssl.com/”) or the Unix modifier (“-“).