When using cmd.exe, you can put multiple commands on the same line by using ‘&’ or ‘&&’ between commands.  Using a single ampersand (&) will cause the first command and then the second command to be run in sequence.  Using double ampersands (&&) introduces error checking.  The second command will run only if the first command is successful.


bake pie & bake cake – Bake pie will run, and once it’s completed, regardless of whether it was successful, bake cake will run.

bake pie && eat pie – Eat pie will only be run if bake pie is successful.  I’m not sure of how useful this is at an interactive command line, but in a batch file or the Run dialog, it definitely can be useful.

bake pie && eat pie && clean plate – You can chain together more than two commands.  Using the double ampersand here, each command is executed in sequence until all commands are executed or until one of them fails, at which point, execution of the entire line terminates.

Further Reading

Microsoft Article