Share via


Backslashes vs. slashes - who knew?

Here's something I'd never noticed until today, when I discovered it quite by accident. In general, to run a program in a different directory, you specify the path with backslashes, such as C:\WINDOWS\system32\notepad.exe. This should be no surprise. What is surprising, though, is that if you use call to run this, you can use forward slashes: call C:/WINDOWS/system32/notepad.exe.

I'd love to know the reasoning behind this; it's not particularly useful unless you're a Linux guy who can't get out of the habit of using /. Even then, though, it's exceedingly unlikely that you'd precede everything with call.

Comments

  • Anonymous
    June 07, 2005
    The comment has been removed
  • Anonymous
    June 07, 2005
    I like this too. Thanks for posting. Having come from a Unix world, it comes in handy. However the command completion doesnt seem to work in this mode :-(
  • Anonymous
    June 08, 2005
    Oh, don't get me wrong - I think backslashes were a horrible idea. Having done phone support in the past, it's difficult to explain to customers which one is the backslash ("No, sir, the backslash. It's not the one under the question mark, it's the other one. Right. It looks like a tree falling to the left.").

    It's an interesting theory that this came along in the IE4 days. That might also explain why command completion doesn't work (as it doesn't in your browser's address bar). I'll have to make myself a virtual machine with an older OS on it sometime to test that theory.