Why DOS and Windows got stuck using backslashes for file paths
Unix established the forward slash / as the standard path separator in the early 1970s. But when Microsoft introduced directories in MS-DOS 2.0 in 1983, it couldn't copy Unix. DOS 1.0 had inherited CP/M's convention of using / to signal command-line options, like DIR /W. To keep existing scripts and user habits from breaking, Microsoft adopted the backslash \ for file paths, saddling Windows developers with escaping path characters ever since.
The Clash of Two Conventions
In the early days of personal computing, the forward slash (/) already had an established role in the Unix operating system. Borrowing structural ideas from Multics, the creators of Unix chose the forward slash as the delimiter separating directories in a hierarchical file path. Because it leaned in the natural direction of reading and had long been used as a divider or fraction bar in typography, the forward slash felt intuitive for moving downward through a hierarchy of folders.
A completely different trajectory unfolded in the microcomputer world of the late 1970s. Operating systems such as Digital Research's CP/M did not possess a hierarchical directory system at all. Disks were small, files existed in a flat list per drive, and command lines were simple. To modify command behavior, CP/M settled on the forward slash as a switch indicator. Typing a command like DIR /W signaled to the program that the user wanted wide display output rather than the default vertical list. When Tim Paterson created 86-DOS—which Microsoft subsequently acquired and transformed into MS-DOS 1.0—he preserved CP/M's command structure, including the slash-as-switch convention, to ensure that users and existing software could transition smoothly.
An ASCII Addition Looking for a Purpose
The backslash (\) character did not exist in typewriter layouts or traditional typography. It was introduced in 1961 by computer scientist Bob Bemer during the design of the American Standard Code for Information Interchange (ASCII). Bemer needed distinct mathematical operators for algorithmic languages such as ALGOL, specifically to represent Boolean logic. The forward slash already symbolized Boolean 'or' when pointed upward (\/), while pairing it with an inverted slash could construct other symbols. Outside of specialized programming logic, however, the backslash had no common everyday usage.