Live data from Hacker News

Why is the DOS path character "\"?

blogs.msdn.com

61–68 of 68 posts

Re: Why is the DOS path character "\"?

#61
post #48

Earlier quoted context omitted.

Why is - and -- used as a switch character if it is used in dates (and even quite common in normal text, names) Those uses rarely have it next to whitespace, and almost never immediately after whitespace. If someone’s named Jean-Claude, it is not customary to refer to them as -Claude for short, and if I refer to items dated 2012-03-19 and 2012-03-20, it is not customary to call one of them -20. But that last example…

Well responded. Two (not entirely serious) counterarguments: - Lists like this - Abusing the char as em-dash - Weird languages. In German it's quite common to use that character to shorten the monster words. Pulling samples from my reared (note the disclaimer about being not to serious) Lebens- und Krankenversicherung (Shorthand for Lebensversicherung und Krankenversicherung) The inverse is possible, but less common…

All good points. I would say that lists like that are also abuse; the hyphens there ought to be · or something similar. But it certainly appears in the wild. (Similarly, in formal contexts, the negative sign is − and not -, but very few people care.)

The last usage is also possible in English. A construction like “face-huggers and -eaters” is rare but not outlandish.

Re: Why is the DOS path character "\"?

#62
post #34

Earlier quoted context omitted.

There are other uses of the slash character. It's a poor choice. _ or | get my vote, but it's a bit late now to fix the mistakes of the past. There are enough special chars needed anyway that collisions are inevitable. At least they didn't pick 'E'.

The problem with those characters is that they require you to hold shift to type them on a standard keyboard. Also, they make you reach in a way that / doesn't (now I'm showing my pro-/ bias).

On which standard keyboard?

Each country has a different layout, are you aware of it?

In most European countries both types of slash require two key presses.

Re: Why is the DOS path character "\"?

#63

I've always felt the better question is "Why is the UNIX path character "/"? People use "/" as a date separator as in 12/25/1979 so effectively banning that character as a character in filenames seems a really poor choices. By that metric chosing "\" is a much better choice because "\" is used no where I know outside of computers. I've never encountered it anywhere outside of computers so arguable it's the perfect ch…

In addition to the other reasons listed here, / is easier to type than \

On which country?

Re: Why is the DOS path character "\"?

#64
post #44
post #28

Earlier quoted context omitted.

You could still do that with copy in MS-DOS, I have a feeling my mom still does it since she has a printer on parallel port. So if she wants to print a textfile it's just copy file.txt LPT1 she can also print multiple files or results of print to file using the /b switch (binary) ignoring EOF That also explains why you shouldn't use LPT1 as file name - it was a special name that meant first parallel port. I remember…

I'm pretty sure you could still do this up until at least Win2k+ if your mapped printer had a port associated.

It still works on Windows 7. Sadly, I know that offhand due to having to deal with some weird legacy stuff from our corporate HQ.

Re: Why is the DOS path character "\"?

#65

I've always felt the better question is "Why is the UNIX path character "/"? People use "/" as a date separator as in 12/25/1979 so effectively banning that character as a character in filenames seems a really poor choices. By that metric chosing "\" is a much better choice because "\" is used no where I know outside of computers. I've never encountered it anywhere outside of computers so arguable it's the perfect ch…

It seems from http://cm.bell-labs.com/who/dmr/hist.html that Multics used > as the path separator. Unix decided to use for redirection (in the PDP7 era), so something else was chosen for pathnames when they were introduced later on the PDP11.

Re: Why is the DOS path character "\"?

#67
post #63

Earlier quoted context omitted.

On which country?

The majority: http://en.wikipedia.org/wiki/US_keyboard#QWERTY-based_layout...

I have reading comprehension issues, because if I count correctly almost all layouts require AltGr or Shift to obtain \ or /.

But hey that is just me.

Re: Why is the DOS path character "\"?

#68
post #67

Earlier quoted context omitted.

The majority: http://en.wikipedia.org/wiki/US_keyboard#QWERTY-based_layout...

I have reading comprehension issues, because if I count correctly almost all layouts require AltGr or Shift to obtain \ or /. But hey that is just me.

Put those into the tie category.
Post reply on HN