Windows is a Unix-like operating system that was created in 1990. It is used by millions of people around the world. Windows has its own set of conventions for how files are stored and accessed, which can make it difficult to understand why other operating systems use different conventions. For example, Windows uses backslashes () to represent special characters in file names, such as “C:\Users\username\AppData\Roaming.minecraft”. Other operating systems use forward slashes (/) to represent these same characters. This difference can be confusing for users who are not familiar with the differences. One reason why Windows uses backslashes is because it is easier to type than forward slashes. When you type “C:\Users\username\AppData\Roaming.minecraft”, Windows looks for the pathname “C:\Users\username.minecraft” and returns a backslash instead of the forward slash character, which would require you to type “\ Users \ username \AppData \Roaming.minecraft”. This feature is called the “filename extension” and it helps make Windows more efficient when searching for files. Another reason why Windows uses backslashes is because they are used in file permissions. When you create a new file on Windows, you must specify its permissions before you can start writing to it. The permissions are like the security code for a door: You must give them to Microsoft before you can access the file. The same goes for files: You must give them their correct permissions before you can access them. If you don’t give Microsoft these permissions, Microsoft will not allow anyone else to access your file even if they have proper permissions! This feature is called “file security” and it helps protect your files from unauthorized access. Finally,Windows also uses backslashes when referring to directories. For example, when you say “C:\Users<user name>.minecraft”, Windows refers to the directory “C:\Users<user name>


Have you ever noticed that it’s C:\Windows\ in Windows, http://howtogeek.com/ on the web, and /home/user/ on Linux, OS X, and Android? Windows uses backslashes for paths, while everything else seems to use forward slashes.

Modern software tries to automatically correct you when you type the wrong type of slash, so it doesn’t matter which type of slash you use most of the time. But, sometimes, the difference still matters.

Why Windows Uses Backslashes: A History

So why is Windows the odd operating system out? It’s all down to a few accidents of history that happened decades ago.

Unix introduced the forward slash character — that’s the / character — as its directory separator around 1970. We don’t really know why they chose this one, but that’s the one they picked.

It’s hard to imagine today, but the original version of Microsoft DOS — that’s MS-DOS 1.0 — didn’t support directories at all when it was released in 1981. Most of the utilities included with DOS were written by IBM, and they used the / character as a “switch” character. You can still see this today in the command prompt — running the command dir /w tells the dir command to run with the wide list format option, while running the command dir c:\ tells the dir command to list the contents of drive C:. The different types of slashes here indicate whether you’re specifying an option or a directory path. (On Unix, the – character is used instead of the / character to indicate switches.)

At the time, people didn’t really care that they were using a character that was used for a different purpose on another operating system.

RELATED: Does Windows Still Rely on MS-DOS?

MS-DOS 2.0 introduced support for directories, but IBM wanted to keep compatibility with the original DOS utilities and other programs that expected the / character to be used for switches. Microsoft had already used the / character for something, so they couldn’t just re-use it. They ultimately chose the \ character instead, as it was the most similar-looking character visually.

Windows may not be built on top of DOS anymore, but you can still see the legacy of DOS throughout Windows in the way backslashes and other features like drive letters are used for the file system.

Many of these details are from Microsoft employee Larry Osterman’s blog post on the subject, which contains more detailed inside information from Microsoft employees who made these decisions.

Why Everything Else Uses Forward Slashes

This all wouldn’t really matter today, but web browsers follow the Unix convention and use / characters for web page addresses. A typical Windows user sees a forward slash when they type a web address and a backslash when they type the location of a local folder, so this can be confusing. Websites follow the Unix convention, as do other protocols like FTP. Even if you’re running a web server or FTP server on a Windows machine, they’ll use forward slashes because that’s what the protocol calls for.

Other operating systems use forward slashes for the same reason — it’s the Unix convention. Linux is a Unix-like operating system, so it uses the same type of slash. Mac OS X is based on BSD, another Unix-like operating system. Other consumer operating systems like Android, Chrome OS, and Steam OS are based on Linux, so they use the same type of slash.

Does it Matter?

The more interesting question is whether it really matters. Browser and operating system developers seem to realize that users are confused, so they often go out of their way to accept any type of slash possible. If you type http:\howtogeek.com\ into Google Chrome, Mozilla Firefox, or Internet Explorer, the browser will automatically correct it to http://howtogeek.com/ and load the website normally. If you type C:/Users/Public into Windows Explorer and press Enter, it will automatically be corrected to C:\Users\Public and you’ll be taken to the correct location.

DOS developers weren’t happy with this even in the early days, so they made DOS accept both types of characters for paths. You can still type commands like cd C:/Windows/ into the Command Prompt today and you’ll be taken to the correct folder.

This doesn’t work everywhere in Windows, however. If you type a path like C:/Users/Public into the Open dialog and press Enter, you’ll see an error saying that the file name isn’t valid. There are other web-based applications that may show you an error if you attempt to type a path like http:\howtogeek.com\ — it depends whether the program corrects it for you or decides to display an error.

You can usually forget that there are two different types of slashes, but it occasionally does matter. It would be nice if everyone used a consistent separator for directory paths, but Windows has historically been all about backward compatibility — even in the early 1980s.