1. 29

  2. 15

    I tend to repeat this advice, but you can save yourself a lot of trouble by just using / in Windows paths instead of trying to be “multi platform” and varying by os.

    1. 6

      I’ve been using Windows on and off since 1993 (never in a developer role though) and it was not until today I learned that slash and backslash as path delimiters have been equivalent since Windows NT.

      1. 4

        Unfortunately they’re equivalent until they aren’t. NTFS doesn’t care which slashes you use, but batch commands like DEL and COPY do care.

        1. 2

          Is there a reason to use batch commands instead of a POSIX-compliant shell of some kind?

          1. 4

            Portability. You cannot assume a POSIX compliant shell being present on all systems.

    2. 15

      This is a great history article. Ironically, the title is illustrative of this issue we have of escaping markup and delimiters and such: In my browser (Chrome on Mac OSX) I see the title as

      Why is the DOS path character “”?

      A peek at the source reveals the following everywhere, including the actual title line

      <h1 class="entry-title">Why is the DOS path character &quot;&quot;?</h1>

      So, I’m guessing that he didn’t use a text editor but some kind of content generator that generated the final html for him, and that software borked when he typed “\” when, much like this system, it really wants him to type “\\”.

      The additional irony comes from the last line:

      Edit: Fixed title - it’s been bugging me all week.

      I’m assuming this is what he was referring to.

      1. 9

        Indeed, when I fetched the title in the submission I noticed the lack of backslash and had to add it. No doubt it was there for a while then there was a blog migration and it disappeared again!