What is the difference
between the
two slashes (/, \) computers use?
For Microsoft and IBM operating systems, the two slashes are used for
two distinctly different purposes.
Microsoft uses the backwards slash, or backslash (\), to indicate
folder names and paths. For example, the path C:\Windows\System indicates
the System folder inside the Windows folder on the C: drive. This designation
continued with the advent of networking, with paths such as \\Server1\Public\Data
indicating the Data folder in the Public shared folder on the computer
named Server1. So to look at the contents of one's Windows folder a user
might type DIR C:\Windows at an MS-DOS prompt.
By contrast, when running a program the forward slash (/) typically indicates an option for a program to use. These options, or switches, tell the program to do its thing in a specific way, different from the standard way. For example, the /? option is quite common, and is typically used when a user wants help for a command. Typing DIR /? displays a list of all the options possible for that command. Armed with this list, the user can type DIR C:\Windows /OD /P to see the directory listing of the Windows folder, sorted by date, with a pause after each screenful.
Unix systems, on the other hand, use the forward slash to indicate folder names. Users commonly see this in web site addresses, since the vast majority of web servers run some form of Unix. Even Microsoft had to conform to this syntax. For example, entering www.teamITS.com/internet in a browser will connect to our web site but start the user directly in the internet folder.
October 2001
Send this article to a friend!
Subscribe to The ITS Connection