JSI Tip 3653. How can a batch file change the size of the CMD window, to facilitate scrolling the expected output?


If you want to scroll the CMD window while a batch file is running, you can alter the Windows width (characters) and depth (screen buffer lines) by issuing a mode command in the batch file:

mode con\[:\] \[cols=c\] \[lines=n\]

where:

con\[:\]   indicates the change is to be made to the current command prompt window.

cols=c   specifies the width, c, in characters.

lines=n  specifies the number of lines, n, in the screen buffer.


Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish