Slash Versus Slash

March 4, 2011

I was going to say that there are two kinds of slashes in the world; Forward slashes and back slashes. But then there is the guitarist from the rock group “Guns N’ Roses” that goes by the name Slash. So, when it comes to Windows computers, there are two types of slashes.

A forward slash, usually referred to as a slash, looks like this: /

A backslash looks like this:

On most keyboards you can type a slash by hitting the key just to the left of the right-hand shift key and you can type a backslash by hitting the key just above the enter key.

Both have different uses. If you use the wrong one, it won’t work in most cases.

The forward slash, of course, is a punctuation mark in the English language used primarily as a way to abbreviate. For example, instead of writing without you can write w/o.  Instead of writing “She went with Sam.”, You can write “She went w/Sam.” And so forth.

A forward slash is used in bowling to denote a spare.

A forward slash is often used to denote an argument to a program. For example, if you wanted to run a chkdsk command,  you might use add the ‘/f’ argument to the command to tell chkdsk to automatically fix any errors it found. The resulting command would be: chkdsk /f

Forward slashes are generally used in website addresses. For example: Note the forward slashes after http and another forward slash after .com. Forward slashes are often used in dates like 12/25/2010. It’s often used as a division operator. So if you wanted to write 100 divided by 25 equals 4, you could write: 100/25=4.

By the way, here is something you probably didn’t know. Ignoring http://, did you know that everything before the first ‘/’ in a website address is not case sensitive and everything after the first ‘/’ is case sensitive. In the example we gave above, the part after the first slash is “?page_id=549”. If you changed the case of any of those letters, it wouldn’t work. But by the same token, if you entered WWW.CT-CP.COM in all caps, it would work.

Forward slashes are used as the division operator instead of ÷ because ÷ is too much like the plus sign(+).  So 10 ÷ 2 = 5 would be written 10 / 2 = 5.

There are other uses of the forward slash character, but you get the idea.

Uses of backslashes are much less common.

Backslashes are generally used in Windows as a separator. For example: C:Program gives you the exact location to run a game called Tetris. This designation tells you it’s on the C drive. On the C drive, it’s under Program Files and then under a folder called Tetris. And the name of the program that actually runs the game is tetris.exe.

Backslashes are often used as an escape character. An escape character tells the computer to treat the next character exactly as written. For example, if you wanted to do a search for all any files on your computer that contained words that start with the word ‘fire’, you might do a search for ‘fire*’. In this example, the asterisk is a wildcard and has a special meaning. But what if you wanted to search for something that actually had an asterisk in it? If you put an asterisk, it would think you wanted it to be a wildcard. To get around that, you precede it with a backslash. That tells the computer to treat it as an asterisk, not as a wildcard operator.

The other common uses for backslashes are in referring to other computers on a Windows network. For example, if I have several computers in my home or business, each computer has a name. You can name a computer whatever you want as long as there are no other computers on the same network with the same name. You can access information on another computer on the same network by prefacing the name of the computer with two backslashes.

So if I am using PC1 and there is another computer called PC2 on the network, I can access information on PC2 by using the name \PC2. Of course, in order for this to really work, all of the security has to allow it. You can refer to a folder or file on a network computer. If PC2 had a file called grocerylist.doc located at c:usersfrankdocuments, you could directly open that file by opening \PC2usersfrankdocumentsgrocerylist.doc. If PC2 has a printer called Printer1, I can print to it by printing to \PC2Printer1.

Other operating systems like Unix use the forward slash and backslash in different ways from Windows, but we only addressed Windows in this article.

I hope this article didn’t make you want to slash your wrists.



Leave a Reply

You must be logged in to post a comment.