in reply to Re^2: Using regex to separate parameters
in thread Using regex to separate parameters

The fact that it's sometimes optional doesn't mean it's always optional.
>c:\foo bar\test.pl 'c:\foo' is not recognized as an internal or external command, operable program or batch file. >"c:\foo bar\test.pl" Hello World

The same applies for the registry where command lines are expected such as in file associations.

Replies are listed 'Best First'.
Re^4: Using regex to separate parameters
by resistance (Beadle) on Jul 06, 2008 at 18:14 UTC
    'c:\foo' is not recognized as an internal or external command,

    this error message occur because you type this manually in cmd.exe

    in cmd.exe this will work:
    foo.exe bar
    if "foo.exe bar.exe" exists in the %path%

    this was not my question, thanks anyway
      No, it won't.
      >foo.exe bar 'foo.exe' is not recognized as an internal or external command, operable program or batch file. >"foo.exe bar" Hello World