怎样写一个批处理让它执行完一个py之后自动开始执行另一个py,假设有5个这样连续执行的py文件?
假设有五个在c:新建文件夹(1)上的py文件,1.py,2.py,3.py,4.py,5.py@echooffif"%1"=="h"gotobeginmshtavbscr...
假设有五个在c:新建文件夹 (1)上的py文件,1.py,2.py,3.py,4.py,5.py
@echo off
if "%1" == "h" goto begin
mshta vbscript:createobject("wscript.shell").run("%~nx0 h",0)(window.close)&&exit
:begin
@echo off
set cmd1="C:\新建文件夹 (1)\1.py"
set cmd2="C:\新建文件夹 (1)2.py"
set cmd3="C:\新建文件夹 (1)3.py"
set cmd4="C:\新建文件夹 (1)4.py"
set cmd5="C:\新建文件夹 (1)5.py"
start call %cmd1%
start call %cmd2%
start call %cmd3%
start call %cmd4%
start call %cmd5%
这段代码能实现该操作吗?如果不行请帮忙修正~谢谢~~
后面四个漏了\
set cmd2="C:\新建文件夹 (1)\2.py"
set cmd3="C:\新建文件夹 (1)\3.py"
set cmd4="C:\新建文件夹 (1)\4.py"
set cmd5="C:\新建文件夹 (1)\5.py" 展开
@echo off
if "%1" == "h" goto begin
mshta vbscript:createobject("wscript.shell").run("%~nx0 h",0)(window.close)&&exit
:begin
@echo off
set cmd1="C:\新建文件夹 (1)\1.py"
set cmd2="C:\新建文件夹 (1)2.py"
set cmd3="C:\新建文件夹 (1)3.py"
set cmd4="C:\新建文件夹 (1)4.py"
set cmd5="C:\新建文件夹 (1)5.py"
start call %cmd1%
start call %cmd2%
start call %cmd3%
start call %cmd4%
start call %cmd5%
这段代码能实现该操作吗?如果不行请帮忙修正~谢谢~~
后面四个漏了\
set cmd2="C:\新建文件夹 (1)\2.py"
set cmd3="C:\新建文件夹 (1)\3.py"
set cmd4="C:\新建文件夹 (1)\4.py"
set cmd5="C:\新建文件夹 (1)\5.py" 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询