Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Backslash
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Filenames=== [[MS-DOS]] 2.0, released 1983, copied the idea of a [[hierarchical file system]] from [[Unix]] and thus used the (forward) [[slash (punctuation)|slash]] as the directory separator.<ref>{{cite web |url=https://learn.microsoft.com/en-us/archive/blogs/larryosterman/why-is-the-dos-path-character |title=Why is the DOS path character "\"? |publisher=Blogs.msdn.com |date=2005-06-24 |access-date=2013-06-16 |archive-date=2022-11-19 |archive-url=https://web.archive.org/web/20221119103949/https://learn.microsoft.com/en-us/archive/blogs/larryosterman/why-is-the-dos-path-character |url-status=live }}</ref> Possibly on the insistence of IBM,<ref>{{ cite web | url = http://www.os2museum.com/wp/why-does-windows-really-use-backslash-as-path-separator/ | title = Why Does Windows Really Use Backslash as Path Separator? | access-date = 28 May 2019 | last = Necasek | first = Michal | date = 24 May 2019 | website = <nowiki>OS/2 Museum</nowiki> | archive-url = https://web.archive.org/web/20190524202002/http://www.os2museum.com/wp/why-does-windows-really-use-backslash-as-path-separator/ | archive-date = 24 May 2019 | df = dmy-all }}</ref><ref>{{Citation |title=MS-DOS v1.25 and v2.0 Source Code, README.txt |date=1983<!-- https://github.com/microsoft/MS-DOS/blob/04a3d20ff411409ab98474892b2bb1713bde0f7f/v2.0/source/UINIT.ASM#L22&:~:text=Corp.%201981%2C%201982-,%2C%201983,-%22%2C13 --> |first1=Chris |last1=Larson <!-- MS-DOS Product Marketing Manager --> |first2=Don |last2=Immerwahr <!-- Microsoft OEM technical support--> |url=https://github.com/microsoft/MS-DOS/blob/master/v2.0/source/README.txt#L41&:~:text=last%20minute%20changes,the%20switch%20character. |publisher=Microsoft |access-date=21 November 2022 |quote=The user manual contains some significant errors. Most of these are due to last minute changes to achieve a greater degree of compatibility with IBM's implementation of MS-DOS (PC DOS). This includes the use of "\" instead of "/" as the path separator, and "/" instead of "-" as the switch character. For transporting of batch files across machines, Microsoft encourages the use of "\" and "/" respectively in the U.S. market. [...] We apologize for any inconveniences these changes may have caused your technical publications staff. |archive-date=21 November 2022 |archive-url=https://web.archive.org/web/20221121055228/https://github.com/microsoft/MS-DOS/blob/master/v2.0/source/README.txt#L41&:~:text=last%20minute%20changes,the%20switch%20character. |url-status=live }}</ref> Microsoft added the backslash to allow paths to be typed at the command line interpreter prompt, while retaining compatibility with MS-DOS 1.0 (in which {{char|/}} was the command-line option indicator. Typing "{{mono|DIR/W}}" gave the "wide" option to the "{{mono|[[DIR (command)|DIR]]}}" command, so some other method was needed if one actually wanted to run a program called {{mono|W}} inside a directory called {{mono|DIR}}). Except for [[COMMAND.COM]], all other parts of the operating system accept both characters in a [[path (computing)|path]], but the Microsoft convention remains to use a backslash, and [[Application programming interface|APIs]] that ''return'' paths use backslashes.<ref> {{cite web | url = http://msdn.microsoft.com/en-us/library/system.io.path.getfullpath.aspx | title = Path.GetFullPath Method | work = .NET Framework Class Library | publisher = Microsoft | access-date = 2009-01-02 | archive-url= https://web.archive.org/web/20081221114738/http://msdn.microsoft.com/en-us/library/system.io.path.getfullpath.aspx| archive-date= 21 December 2008 | url-status= live}}</ref> In some versions<!-- MS-DOS/PC DOS 2.xx-3.xx, all versions of DR-DOS since 5.0, as well as PTS-DOS and FreeDOS, but not in FlexOS, 4680 OS, 4690 OS. -->, the option character can be changed from {{mono|/}} to {{mono|-}} via [[SWITCHAR]], which allows COMMAND.COM to preserve {{mono|/}} in the command name. The [[Microsoft Windows]] family of operating systems inherited the MS-DOS behavior and so still support either character β but individual Windows programs and sub-systems may, wrongly, only accept the backslash as a path delimiter, or may misinterpret a forward slash if it is used as such. Some programs will only accept forward slashes if the path is placed in [[Quotation mark|double-quotes]].<ref> {{cite web | url = http://bytes.com/groups/python/23123-when-did-windows-start-accepting-forward-slash-path-separator | title = When did Windows start accepting forward slash as a path separator? | publisher = Bytes.com | access-date = 2009-01-02 | archive-url= https://web.archive.org/web/20090206050805/http://bytes.com/groups/python/23123-when-did-windows-start-accepting-forward-slash-path-separator| archive-date= 6 February 2009 | url-status= live}}</ref> The failure of Microsoft's security features to recognize unexpected-direction slashes in local and Internet paths, while other parts of the operating system still act upon them, has led to some serious lapses in security. Resources that should not be available have been accessed with paths using particular mixes, such as {{mono|<nowiki>http://example.net/secure\private.aspx</nowiki>}}.<ref>{{cite web |url=http://www.devsource.com/c/a/Using-VS/Microsoft-Probes-Flaw-in-ASPNET/ |archive-url=https://archive.today/20130121115529/http://www.devsource.com/c/a/Using-VS/Microsoft-Probes-Flaw-in-ASPNET/ |url-status=dead |archive-date=2013-01-21 |title=Microsoft Probes Flaw in ASP.NET |last=Kaplan |first=Simone |publisher=Ziff Davis Enterprise Holdings Inc. |work=DevSource, sponsored by Microsoft |year=2004 |access-date=2009-06-14 }}</ref><ref>{{cite web | url=http://www.securityfocus.com/columnists/285 | title=Security Holes That Run Deep | last=Burnett | first=Mark | publisher=SecurityFocus | year=2004 | access-date=2009-06-14 | archive-date=2021-02-02 | archive-url=https://web.archive.org/web/20210202211420/https://www.securityfocus.com/columnists/285 | url-status=live }}</ref>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)