Batch file 批处理脚本在第一次调用其他批处理脚本后停止
我正在尝试执行一个批处理脚本,该脚本当前如下所示:Batch file 批处理脚本在第一次调用其他批处理脚本后停止,batch-file,Batch File,我正在尝试执行一个批处理脚本,该脚本当前如下所示: D: cd D:My Documents\FtpSolution\Test getftp.bat call delimconvert.exe call convert-to-xls.bat 但是,在getftp.bat运行后,此操作将停止 我做错了什么?这些命令必须按顺序运行。使用start命令在新窗口中启动它 start/wait getftp.bat使用call: Calls one batch program from another.
D:
cd D:My Documents\FtpSolution\Test
getftp.bat
call delimconvert.exe
call convert-to-xls.bat
但是,在getftp.bat运行后,此操作将停止
我做错了什么?这些命令必须按顺序运行。使用
start
命令在新窗口中启动它
start/wait getftp.bat
使用call
:
Calls one batch program from another.
CALL [drive:][path]filename [batch-parameters]
batch-parameters Specifies any command-line information required by the
batch program.
如果您调用其他批处理文件而不调用call
,则控制权将传递给它们,但不会再次返回(这是call
所更改的)。尝试在您调用的批处理文件末尾使用“Goto:EOF”而不是“exit”—在您的情况下,getftp.bat文件。。。
这就是我在Win10 enterprise上测试的问题。这是否要求在其他批处理脚本的末尾使用“退出”命令?当前,一旦第一个脚本在新窗口中完成,它就会出现在提示符处。如果被调用的批处理文件调用另一个批处理文件,这将没有帮助。