【发布时间】:2018-08-11 20:46:54
【问题描述】:
假设我有一个名为hello.bat 的批处理文件,它接受两个参数。
根据这里的答案:passing a second parameter in a batch file,我可以通过以下方式使用powershell传递两个参数:
start-process hello "test test2"
现在,考虑到两个参数是用空格分隔的,我将如何传递带有空格的参数。例如,如果第一个参数是 test one 而不是 test 怎么办?我试过start-process hello "test","test 2",似乎不起作用。
【问题讨论】:
-
你试过了吗,
start-process hello """test one"",test2" -
我现在做到了。完美运行。您可以将其发布为答案以便我标记它吗?
标签: powershell batch-file parameter-passing