# backslash - technical definition

The backslash symbol (\) is used as a separator between folder and file names in DOS, Windows and OS/2 when the full path to a file is written out. For example, the path c:\cde\cde.exe points to the CDE.EXE file in the CDE folder on the C: drive.

When the universal naming convention (UNC) is used, double backslash (\\) characters serve as a prefix to the server name. For example, \\a5\c\expenses is the path to the EXPENSES folder on the C: drive on server A5. See UNC.

In DOS and Windows programming, double backslash characters (\\) represent an actual single backslash that will be displayed or printed. This is required since the backslash symbol is used to separate names and also define hexadecimal numbers.

An Unfortunate Symbol
The backslash character adds confusion as a path name separator. The backslash key is not located in a standard place on every keyboard, and the path name separator used in Internet addresses is a forward slash, not a backslash. The irony is that Internet addresses are Unix addresses, and when DOS was enhanced to support folders, the same Unix syntax was chosen to define the path to DOS files. However, DOS was designed to replace CP/M, and the first release of DOS used the forward slash for command line parameters (switches) to imitate CP/M. As a result, the forward slash was already in use, and the backslash was chosen as a path name separator. Thus, the backslash is used in Windows addresses, and the forward slash is used in Internet addresses. See path and forward slash.