Это не scala.exe
, но с помощью простого инструмента дампа аргументов командной строки мы получаем
W:\>type 56190749.cmd
vcCmdLine.exe --SET SYNTH 117^
--LOAD /MAPPING \"My mapping\"^
--LOAD \"Intonation with extra spaces\"^
--SEND /FILE \"Test\"^
--EXIT
W:\>56190749.cmd
W:\>vcCmdLine.exe --SET SYNTH 117 --LOAD /MAPPING \"My mapping\" --LOAD \"Intonation with extra spaces\" --SEND /FILE \"Test\" --EXIT
cmdline:[vcCmdLine.exe --SET SYNTH 117 --LOAD /MAPPING \"My mapping\" --LOAD \"Intonation with extra spaces\" --SEND /FILE \"Test\" --EXIT]
arg_000:[vcCmdLine.exe]
arg_001:[--SET]
arg_002:[SYNTH]
arg_003:[117]
arg_004:[--LOAD]
arg_005:[/MAPPING]
arg_006:["My]
arg_007:[mapping"]
arg_008:[--LOAD]
arg_009:["Intonation]
arg_010:[with]
arg_011:[extra]
arg_012:[spaces"]
arg_013:[--SEND]
arg_014:[/FILE]
arg_015:["Test"]
arg_016:[--EXIT]
W:\>
Упрощение экранирования кавычек дает
W:\>type 56190749.cmd
vcCmdLine.exe --SET SYNTH 117^
--LOAD /MAPPING "My mapping"^
--LOAD "Intonation with extra spaces"^
--SEND /FILE "Test"^
--EXIT
W:\>56190749.cmd
W:\>vcCmdLine.exe --SET SYNTH 117 --LOAD /MAPPING "My mapping" --LOAD "Intonation with extra spaces" --SEND /FILE "Test" --EXIT
cmdline:[vcCmdLine.exe --SET SYNTH 117 --LOAD /MAPPING "My mapping" --LOAD "Intonation with extra spaces" --SEND /FILE "Test" --EXIT]
arg_000:[vcCmdLine.exe]
arg_001:[--SET]
arg_002:[SYNTH]
arg_003:[117]
arg_004:[--LOAD]
arg_005:[/MAPPING]
arg_006:[My mapping]
arg_007:[--LOAD]
arg_008:[Intonation with extra spaces]
arg_009:[--SEND]
arg_010:[/FILE]
arg_011:[Test]
arg_012:[--EXIT]
W:\>
Если двойные кавычкивнутри аргументов, тогда мы можем использовать
W:\>type 56190749.cmd
vcCmdLine.exe --SET SYNTH 117^
--LOAD /MAPPING "\"My mapping\""^
--LOAD "\"Intonation with extra spaces\""^
--SEND /FILE "\"Test\""^
--EXIT
W:\>56190749.cmd
W:\>vcCmdLine.exe --SET SYNTH 117 --LOAD /MAPPING "\"My mapping\"" --LOAD "\"Intonation with extra spaces\"" --SEND /FILE "\"Test\"" --EXIT
cmdline:[vcCmdLine.exe --SET SYNTH 117 --LOAD /MAPPING "\"My mapping\"" --LOAD "\"Intonation with extra spaces\"" --SEND /FILE "\"Test\"" --EXIT]
arg_000:[vcCmdLine.exe]
arg_001:[--SET]
arg_002:[SYNTH]
arg_003:[117]
arg_004:[--LOAD]
arg_005:[/MAPPING]
arg_006:["My mapping"]
arg_007:[--LOAD]
arg_008:["Intonation with extra spaces"]
arg_009:[--SEND]
arg_010:[/FILE]
arg_011:["Test"]
arg_012:[--EXIT]
W:\>
Конечно, scala.exe
может иметь определенное поведение, но это один из способов начать попытки.