• palordrolap@fedia.io
    link
    fedilink
    arrow-up
    20
    ·
    8 hours ago

    There used to be an undocumented setting in early versions of MS-DOS that would allow the setting of the command option character to something other than the slash, and if you did that, the slash automatically became the path separator. All you needed was SWITCHAR=- in your CONFIG.SYS and DOS was suddenly very Unix-y.

    It was taken out after a while because, with the feature being undocumented, too many people didn’t know about it and bits of software - especially batch files, would have been reliant on things being “wrong”. The modern support for regular slash in API calls probably doesn’t use any of the old SWITCHAR code, but it is, in some way, the spiritual descendant of that secret feature.

    Here’s an old blog that talks about it: https://learn.microsoft.com/en-gb/archive/blogs/larryosterman/why-is-the-dos-path-character