【发布时间】:2010-10-30 10:53:34
【问题描述】:
重复:
- Is there a way to indicate the last n parameters in a batch file?
- how to get batch file parameters from Nth position on?
澄清:我知道循环方法 - 这甚至在命令扩展之前就有效;我希望有一些有趣且无证的东西,比如 %~*1 或其他 - 就像在 http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/percent.mspx?mfr=true 记录的那些一样。
在 Windows 批处理文件中(启用了所谓的“命令扩展”),%1 是第一个参数,%2 是第二个参数,以此类推。%* 是所有参数的连接。
我的问题:例如,有没有办法在 %2 之后获取所有内容?
我找不到这样的东西,它会对我正在做的事情有所帮助。
【问题讨论】:
标签: windows parameters batch-file arguments