求写批处理文件

来源:百度知道 编辑:UC知道 时间:2024/05/16 08:51:20
写一个批处理来运行N个批处理

运行1.bat
则运行了
C:\soft\1.bat
C:\soft\2.bat
C:\soft\3.bat
C:\soft\4.bat
这样该怎么写啊?

两个方法
CALL C:\soft\1.bat
CALL C:\soft\2.bat
CALL C:\soft\3.bat
CALL C:\soft\4.bat

CMD /C C:\soft\1.bat
CMD /C C:\soft\2.bat
CMD /C C:\soft\3.bat
CMD /C C:\soft\4.bat

还有一种不知道行不行 就是直接
C:\soft\1.bat
C:\soft\2.bat
C:\soft\3.bat
C:\soft\4.bat

1.bat的内容如下,就是

call C:\soft\1.bat
call C:\soft\2.bat
call C:\soft\3.bat
call C:\soft\4.bat

1.bat的内容就是

call C:\soft\1.bat
call C:\soft\2.bat
call C:\soft\3.bat
call C:\soft\4.bat

学习中

1.bat的内容如下

For /L %%i in (1,1,4) do call c:\soft\%%i.bat

1.bat的内容如果还有其它命令,
可将以下内容写到1.bat的末尾。
For /L %%i in (2,1,4) do start c:\soft\%%i.bat