Reputation: 169
I'm attempting to execute 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.
Upvotes: 15
Views: 16210
Reputation: 11
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.
Upvotes: 1
Reputation: 354864
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).
Upvotes: 39
Reputation: 62613
use start
command to launch it in a new window.
start /wait getftp.bat
Upvotes: 2