You are not logged in.
Pages: 1
Hello everyone!
For a long time I searched for a way to get the number of CMD.exe columns. Now I found I share with you:
@echo off
for /f "tokens=1,2" %%a in ('mode con ^| findstr /i .Colunas.') do (set CONSOLE_COLUMNS=%%b)
echo O número de colunas desta janela é %CONSOLE_COLUMNS%
The code is in Portuguese. To change to another language, simply change the word "Column" for the equivalent in the desired language, according to the command displayed by mode con
Offline
Pages: 1