test.cmd:
@echo %1
@echo %2
test.cmd "param1 with space and leading slash\" "param2 with space too"
"param1 with space and leading slash\"
"param2 with space too"
программу ... глюки
С программой тоже нет ошибок:
program Project1;
{$APPTYPE CONSOLE}
uses System.SysUtils;
var i: Integer;
begin
for i := 0 to ParamCount do Writeln( ParamStr(i) ); // uses GetCommandLineW
end.
Project1.exe "param1 with space and leading slash\" "param2 with space too"
Project1.exe
param1 with space and leading slash\
param2 with space too