Command line - batch file calling an additional batch file

I have a batch file which calls an additional batch file that exists in PATH directory site (primarily calling an executable with added buttons.)

: bar.bat:
foo.bat file1.txt
foo.bat file2.txt
etc.

In foo.bat :

foo.exe -t -s %1

bar.bat implements the first command yet leaves immidately (i.e. working with file1.txt just).

Just how can I make this batch file to invoke the various other batch file greater than as soon as?

0
2019-12-02 02:56:10
Source Share
Answers: 3

In enhancement to @splattne is solution, usage exit /b in the CALLed batch file if you require to return early.

0
2019-12-03 05:30:34
Source

Another alternative (for compatibility with DOS before variation 3.3 : -)) is to call the command process with the youngster (/ c) alternative and also the name of the various other batch file to process. That will certainly additionally do a call as opposed to a chain, and also will certainly also work with absolutely old equipments (simply in instance a person stumbles upon this and also cares). : -)

0
2019-12-03 05:25:50
Source

Use the CALL keyword :

call foo.bat file1.txt
call foo.bat file2.txt
0
2019-12-03 04:37:54
Source