(view source code of scrsznt.bat as plain text)
@ECHO OFF
:: Check command line parameters and Windows version
IF NOT [%1]==[] GOTO Syntax
IF NOT "%OS%"=="Windows_NT" GOTO Syntax
:: Store current screen size settings, using MODE CON command
FOR /F "tokens=1,2 delims=: " %%A IN ('MODE CON ^| FIND "s:"') DO SET %%A=%%B
:: Note: the previous command is based on MODE CON's screen output
:: for English Windows versions as shown in the following lines:
::
:: Status for device CON:
:: ----------------------
:: Lines: 25
:: Columns: 80
:: Keyboard rate: 31
:: Keyboard delay: 1
:: Code page: 437
::
:: You may need to make FIND search for other strings
:: than "s:" if you use a different language version.
:: Done
GOTO End
:Syntax
ECHO.
ECHO ScrSzNT.bat, Version 1.00 for Windows NT 4 / 2000 / XP
ECHO Save current window size -- lines and columns -- in
ECHO environment variables "Lines" and "Columns".
ECHO.
ECHO Usage: SCRSZNT
ECHO.
ECHO Notes: Written for English Windows versions only; can be
ECHO adapted easily to other languages using this batch
ECHO file's embedded comments.
ECHO.
ECHO Written by Rob van der Woude
ECHO http://www.robvanderwoude.com
:End
page last modified: 2024-04-16; loaded in 0.0058 seconds