How to type more than one command at the command line
Updated: 12/29/2017 by Computer Hope
Use the pipe or the ampersand to separate your commands. The shell and version of Windows you are using decides what character to use. Below are some additional examples for each version of Windows. In these examples, the cd command would first get to the root of the current drive. Then, the dir command lists the current contents of the root.
Microsoft Windows 2000, XP, Vista, 7, and 8 users
Instead of using the pipe Microsoft decided to change it to the ampersand (&) for reasons unknown. So, type the following command to have the same results as earlier versions of Windows.
cd\ & dir
Microsoft Windows 95, 98, and Me users
cd\ | dir