请问高手:如何给bat程序添加运行参数?
cmd吧
全部回复
仅看楼主
level 1
0427付强 楼主
运行外部程序时,经常要添加参数(比如ping -n),那么,bat程序能试着参数吗?怎么设置参数呢?应该用什么命令?如何编写?希望高手指点
2010年09月18日 13点09分 1
level 5
echo %1
2010年09月19日 10点09分 2
level 1
0427付强 楼主
回复:2楼
非常感谢!除了%1,dos还有没有什么其他比较特殊的变量?
2010年09月21日 11点09分 3
level 6
%0自身
%1 例子:运行的参数为c:\a.bat woshiren
那么%1=woshiren
%2 例子:运行的参数为c:\a.bat woshiren bushiren
那么
%1=woshiren
%2=bushiren
以此类推
2010年09月21日 13点09分 4
level 1
0427付强 楼主
非常感谢大家!
2010年09月21日 14点09分 5
1