#1 By: Chris Hoffman, February 10th, 2014 04:04
Originally published at: http://www.howtogeek.com/181774/why-windows-uses-backslashes-and-everything-else-uses-forward-slashes/
Have you ever noticed that it’s C:\Windows\ in Windows, http://howtogeek.com/
on the web, and /home/user/ on Linux, OS X, and Android? Windows uses backslashes for paths, while everything else seems to use forward slashes.
#2 By: Naman Sood, February 10th, 2014 04:36
Note: Android doesn't have /home; it has /data, /sdcard, and sometimes /ext_card or /external_sd.
#3 By: Meow, February 10th, 2014 09:31
Windows' backslash matters when you do programming. Say a string "d:\new\day" which you think it is a path but most programming languages see it as a totally different thing, especially when regular expression involved. You have to use double backslash to get one literal backslash.
The design of windows is so freaking stupid.
#4 By: Tom Wilson, February 10th, 2014 11:37
It's not stupid at all. The decision makes perfect sense, considering the choice of using the slash as the "switch" flag in command-line programs.
And it's not like the slash was a universal directory separator, either. When MacOS was introduced, it used the colon character.
DOS and Windows have gone through a lot of changes over the years, but I wouldn't call its design any more stupid or chaotic than its only competitor these days, Unix and its children. How many command shells does Unix have these days? csh, bash, ksh.... and then there are all the different flavors: AIX, BSD, Linux (with its own gazillion breeds), and MacOS.
And MacOS discarded X-Window completely in favor of a new graphical environment. So proper Unix programs, even after being compiled from source, still need to be ported to work properly on the Mac without needing a separate X server to fire up.
yeah, Windows is the one with the problem.
#5 By: Damian, February 10th, 2014 12:17
Forward slash? Geek twitch!
#6 By: Tom Wilson, February 10th, 2014 17:38
Right... the term is "slash". There's no such thing as a "forward slash."
#7 By: Marvin Robertss, February 10th, 2014 17:50
We could go with the OpenVMS file structure and use periods as the directory level delimiter.
See, with periods you don't have to worry about using the regular character (slash) or the back one (backslash).
#8 By: Tomba Tomster , February 13th, 2014 06:24
Actually, Firefox FAILS horribly at translating http:\\howtogeek.com\ (for some reason this you have to write three backslashes to make it show two here in this commenting section) to http://www.howtogeek.com/ and instead transforms it to http://www.//howtogeek.com/. Dunno if it works with Crome but with IE 11 it works, imagine that.
#9 By: Naman Sood, February 13th, 2014 10:05
Chrome has an "h" in it. Sorry, couldn't resist.
Chrome is okay - http:\windows.com turns to http://windows.com (which then turns to http://windows.microsoft.com, but that's not important).
#10 By: system, February 20th, 2014 04:04
This topic was automatically closed after 10 days. New replies are no longer allowed.