Thu 21 Dec 2006
Windows Tip #1: Use batch “call” command to make multiple call-outs
Posted by dkaz under Java, Programming, Windows
I was writing a multi-line batch script with multiple call-outs to Ant and I was confused when it kept exiting after the first call-out.
I’m proud to be rusty at batch scripting, so I’m not ashamed to share the (obvious) fix…
To run a batch program from within the current batch program, use the call command followed by the name of the batch program you wish to run. After the second program is finished, it will return to the command which follows the call command.
If you invoke a batch file without using the call command (from within a batch file that is), control passes over to the new batch program and does not return.

December 28th, 2007 at 4:22 pm
Thanks A Lot! I’m ashamed to say that this problem is something I’ve been using “work arounds” to handle for a long time. The simplest things will drive you mad sometimes.