开发者

Batch script stops after first call to other batch script

I'm attempting to exe开发者_StackOverflow社区cute a batch script that currently looks like this:

D:
cd D:My Documents\FtpSolution\Test
getftp.bat
call delimconvert.exe
call convert-to-xls.bat

However this stops dead after getftp.bat has run.

What am I doing wrong? It's important that these commands all run sequentially.


Use 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.

If you invoke other batch files without call then control is passed to them but not back again (which is what call changes).


use start command to launch it in a new window.

start /wait getftp.bat


Try using "Goto :EOF" rather than "exit" at the end of the batch file that you're calling - in your case, the getftp.bat file... That's what fixed mine - tested on Win10 enterprise.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜