Purpose: | Clear the window and move the cursor to the upper left corner; optionally change the default display colors |
Format: | CLS [/C /S] [[BRIght] fg ON [BRIght] bg |
fg | The new foreground color |
bg | The new background color |
Usage:
CLS can be used to clear the window without changing colors, or to clear the window and change the colors simultaneously, or to clear the entire scrollback buffer. These two examples show how to clear the window to the default colors, and to bright white letters on a blue background:
cls
cls bright white on blue
CLS is often used in batch files before displaying text.
See Colors and Color Names for details about colors.
Options:
/C | Clears the entire scrollback buffer. If /C is not used, only the visible portion of the window is cleared. |