【发布时间】:2012-09-01 06:18:12
【问题描述】:
我想使用传递给批处理文件的前 2 个参数,然后将其他所有内容附加到批处理文件中执行的命令中。
有没有简单的方法可以做到这一点?
// batch file
command -Duser=%1 -Dpwd=%2 {? how to pass all remaining arguments on the command line}
批处理会这样执行
batch.bat USR PWD -Dargument1=1 -Dargument2=2
实际上,我希望执行以下操作
command -Duser=USR -Dpwd=PWD -Dargument1=1 -Dargument2=2
【问题讨论】:
标签: batch-file command-line-arguments