Kenny McCormack
2020-11-19 00:48:56 UTC
In a batch file, I want to get the width of the screen (e.g., 80, in the
normal case) into a variable. This is, e.g., the number displayed in the
"Properties" of the Command Prompt window - as the "screen width".
I know how to get this is in a regular programming language (e.g., C or
C++), using a Win32 API call, but I don't know of any easy way to get it
purely in batch (CMD.EXE).
Also, not interested in any solutions that involve things like PowerShell
or VBA. As I said, if it requires going to a regular programming language,
I already know how to do that.
Any ideas?
normal case) into a variable. This is, e.g., the number displayed in the
"Properties" of the Command Prompt window - as the "screen width".
I know how to get this is in a regular programming language (e.g., C or
C++), using a Win32 API call, but I don't know of any easy way to get it
purely in batch (CMD.EXE).
Also, not interested in any solutions that involve things like PowerShell
or VBA. As I said, if it requires going to a regular programming language,
I already know how to do that.
Any ideas?
--
"The party of Lincoln has become the party of John Wilkes Booth."
- Carlos Alazraqui -
"The party of Lincoln has become the party of John Wilkes Booth."
- Carlos Alazraqui -