(view source code of screen.bat as plain text)
:: This batch file for NT shows 3 different ways to display text
:: plus a way to overcome the problem that CLS is ignored when
:: a batch file's output is redirected.
:: Written by Rob van der Woude
:: Since a simple CLS won't clear the screen when redirected,
:: we need to use MODE to clear the screen instead.
:: The FOR command is used to make sure we do not change the
:: console settings when using MODE CON.
MODE CON LINES=%LINES%
:: >CON writes directly to screen, blocking further redirection
:: 1>&2 redirects output to standard error, enabling further
:: redirection with 2>NUL
:: Standard output can be redirected using >NUL or 1>NUL
|page last uploaded: 2017-08-21, 14:26|