How to run multiple commands in Windows command prompt

You can use the & or && symbols to concatenate a number of commands that you would like to run after each other in the Windows command prompt. The difference between them is that in case of && the next command will only run if the previous one does not end in an error. However, the & will execute the next command, regardless of the outcome of the previous one.

This concatenation can be very useful for example when you are building a project where you would have to build seperate parts in seperate directories.

Example commands:

mvn clean install -DskipTests && cd .. && cd proj-web && run-embedded-tomcat7.bat
mvn clean install -DskipTests & cd .. & cd proj-web & run-embedded-tomcat7.bat