backslash

backslash definition - computer

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.



Computer Desktop Encyclopedia THIS DEFINITION IS FOR PERSONAL USE ONLY
All other reproduction is strictly prohibited without permission from the publisher.
Copyright © 1981-2009 by Computer Language Company Inc. All rights reserved.

Comments
Improve this definition.
Do you have more to add? Share your linguistic knowledge or observation.
/Register to save your comments.