How to run Windows command in chain

You can chain commands in dos using the && for example

echo hello&&echo world

As per Microsoft Support:

This behavior occurs because the && command separator performs error checking. If the command to the left of the && command does not return the expected results, the commands to the right of the && command do not run.

And

When you use a single & command, error checking is not performed and all commands run.

You can check here:

Using multiple commands and conditional processing symbols

Multiple Commands on a Single Line May Not Run When You Use the && Command Separator (archived page)

Original link - No longer exists