Command line - batch file calling another batch file

I have a batch file which calls another batch file that exists in PATH directory (basically calling an executable with additional switches.)

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

In foo.bat:

foo.exe -t -s %1

bar.bat executes the first command but exits immidately (i.e. working on file1.txt only).

How can I make this batch file to invoke the other batch file more than once?


Use the CALL keyword:

call foo.bat file1.txt
call foo.bat file2.txt

In addition to @splattne's answer, use exit /b in the CALLed batch file if you need to return early.