How to clear screen in a Windows command line (MS-DOS)

Updated: 12/30/2019 by Computer Hope
clear screen with msdos

From the Windows command line or MS-DOS, you can clear the screen and all commands using the CLS command.

Run a command and then clear the screen

To run a command and then clear the screen, put an ampersand at the end of your command, then the cls command.

test&cls

In the example above, if the current directory contained a batch file called test.bat, it would run the batch file, and then clear screen.

Note

You can also add the cls command in any batch file to clear screen.

Note

If you are trying to hide any confidential information or previously entered commands from the command, the F7 (for doskey) can still show previously entered commands.