CLS — Clear the screen

Synopsis

CLS [/?] [/S/D] [colour]

Options

/?
Display command syntax information.
/S
Clear the screen by scrolling it up by the height of the screen.
/D
Clear the screen by directly writing spaces to the whole of the screen.

Description

The CLS command clears the screen. It can optionally be provided with a colour specification to specify what colour the screen will be cleared to.

If neither the /S nor the /D option are used, it writes ANSI CSI sequences for changing the current colour and clearing the screen to its standard output. If no colour is specified, CLS will clear the screen to the current colour. If a colour is specified, CLS will clear the screen to that colour and leave the current colour as that colour.

If either the /S or the /D option are used, CLS attempts to perform direct access to the console, and its standard output must be a console device. If no colour is specified, CLS defaults to white on black. The current colour is not affected.


The 32-bit Command Interpreter is © Copyright Jonathan de Boyne Pollard. "Moral" rights are asserted.