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.
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.
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 ""?</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.
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!
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.
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.
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.
Is there a reason to use batch commands instead of a POSIX-compliant shell of some kind?
Portability. You cannot assume a POSIX compliant shell being present on all systems.
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
A peek at the source reveals the following everywhere, including the actual title line
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:
I’m assuming this is what he was referring to.
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!