Friday, May 24, 2019

Why Does Windows Use Backslash As the Path Separator?

Michal Necasek (via Hacker News):

Microsoft reportedly wanted to use the forward slash as path separator, but IBM nixed the idea because it would have created an incompatibility with DOS 1.x, which already used the forward slash as a switch character, separating command options.

[…]

Changing the slash semantics had a clear potential for destroying data, especially when running batch files written for DOS 1.1. Something like ‘COPY FOO + BAR /A’ has rather different semantics when /A is a switch vs. when /A is a file or directory in the disk’s root directory.

[…]

There have Microsoft’s own word that the forward slash came not from CP/M, not from IBM, but from DEC, and there’s an explicit mention of TOPS-10.

1 Comment RSS · Twitter

As someone that started his career on CP/M and on Alpha Micro computers that used an OS closely based on TOPS-10, this was quite a trip down memory lane! And yes, thank goodness Windows did not copy the strange [nn,nn] paird number folder organization system that TOPS-10 used. If I recall correctly, [1,4] was where applications (.EXE) files lived, [1,6] was drivers, etc. At one point I had dozens of those numeric pairs memorized. There was no further nesting beyond the pair of numbers, so one would do that with numbers, for example a project might be in folders starting with [1234,100], with ,101 for source, ,102 for object, ,103 for help files, etc. I was later very happy to start using systems with a real folder hierarchy.

Leave a Comment