How to execute several batch commands in sequence

Posted by ptikobj on Stack Overflow See other posts from Stack Overflow or by ptikobj
Published on 2011-01-12T20:31:40Z Indexed on 2011/01/12 20:54 UTC
Read the original article Hit count: 473

Filed under:
|

I want to create a Windows XP batch script that sequentially performs something like the following:

@echo off
:: build everything
cd \workspace\project1
mvn clean install
cd ..\project2
mvn clean install

:: run some java file
cd \workspace\project3
java -jar somefile.jar

When I create a Batch script like this (following these instructions), I still have the problem that the script stops doing something after the first

mvn clean install

and then displays the command line. How can i execute all of these commands in sequence in one batch file?

I don't want to refer to other files, I want to do it in one file.

© Stack Overflow or respective owner

Related posts about batch-file

Related posts about cmd