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

  • See our MS-DOS commands page for a full listing of commands.
  • MS-DOS and Windows command line help and support.