Windows – Executing multiple commands from a Windows cmd script

batch-filecmdscriptingwindows

I'm trying to write a Windows cmd script to perform several tasks in series.
However, it always stops after the first command in the script.

The command it stops after is a maven build (not sure if that's relevant).

How do I make it carry on and run each task in turn please?

Installing any software or configuring the registry etc is completely out of the question – it has to work on a vanilla Windows XP installation I'm afraid.

Ideally I'd like the script to abort if any of the commands failed, but that's a "nice to have", not essential.

Thanks.

Best Answer

When you call another .bat file, I think you need "call" in front of the call:

call otherCommand.bat