Paths are used extensively in computer science to represent the directory/file relationships common in modern operating systems and are essential in the construction of Uniform Resource Locators (URLs).
When directory support was added to MS-DOS in version 2.0, "/" was kept as the switch prefix character for backward compatibility.
[2][3] An absolute or full path points to the same location in a file system, regardless of the current working directory.
// (root of domain) / (root of current node) note: prefix may be a number (0–31), * (boot volume) or @ (AppleShare home directory) hb set -p --product [PRODUCT_NAME] Japanese and Korean versions of Windows may often display the '¥' character or the '₩' character instead of the directory separator.
Very early versions of MS-DOS replaced the backslash with these glyphs on the display to make it possible to display them by programs that only understood 7-bit ASCII (other characters such as the square brackets were replaced as well, see ISO 646, Windows Codepage 932 (Japanese Shift JIS), and Codepage 949 (Korean)).
Although even the first version of Windows supported the 8-bit ISO-8859-1 character set which has the Yen sign at U+00A5, and modern versions of Windows supports Unicode which has the Won sign at U+20A9, much software will continue to display backslashes found in ASCII files this way to preserve backward compatibility.
The UNC syntax for Windows systems has the generic form: Microsoft often refers to this as a "network path".
Some Microsoft Windows interfaces also allow or require UNC syntax for WebDAV share access, rather than a URL.
The UNC syntax is extended[9] with optional components to denote use of SSL and TCP/IP port number, a WebDAV URL of http[s]://HostName[:Port]/SharedFolder/Resource becomes When viewed remotely, the "SharedFolder" may have a name different from what a program on the server sees when opening "\SharedFolder".
This can be simplified by using raw strings, as in C#'s @"\\\\" or Python's r'\\\\', or regular expression literals, as in Perl's qr{\\\\}.
(Using "./foo" to refer to a file "foo" in the current working directory can sometimes usefully distinguish it from a resource "foo" to be found in a default directory or by other means; for example, to view a specific version of a manual page instead of the one installed in the system.)
Contrary to popular belief, the Windows system API accepts slash, and thus all the above Unix examples should work.
Indicating a file on a disk other than the current one requires prefixing a drive letter and colon.
No ambiguity ensues, because colon is not a valid character in an MS-DOS filename, and thus one cannot have a file called "A:" in the current directory.
A path containing forward slashes often needs to be surrounded by double quotes to disambiguate it from command-line switches.