The Use of the (“/”) and (“\”)

Murat Yildirimoglu, 10/03/2003


In my MCSE training classes I observe that many of the students confuse the use of the slash and the backslash frequently. I will give some information about the use of these characters.


These characters are frequently used in the addressing of the resources (local or network resources). Resources are typically files and folders but they can be printers or services also. According to the locations of the resources we can categorize them into 3 categories:


1)      Resources on the local disk: We use “\” character when we address the local file resources. For example, address of the file “letter.doc” under the folder “documents” that is located under the drive “C:” is as follows:  C:\documents\letter.doc

2)      Resources on the NetBIOS networks: Resources on a NetBIOS network are addressed using the UNC (Universal Naming Convention) notation. And in this notation also we use “\” character. For example, the address of a file, named “letter.doc”, in a share “documents”, located on a computer named “MSERVER”,  is as follows:  \\MSERVER\documents\letter.doc

3)      Resources in the Internet: Internet resources are addressed using the URLs (Uniform Resource Locator). In the URLs the “/” character is used. For example, the address of a file, named “letter.doc”, under a directory, named “documents” of Web site, named, is as follows:


Last point: When we execute commands from a command console, we can use switches, that are instructions to the command. For example, DIR command  displays the files and folders of the current folder. But if you give the command with “/P”, that is, DIR /P, files and folders are displayed page by page. All the command switches are entered using “/” or “–“ characters, not “\” character.