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

Jerold Schulman

May 2, 2001

1 Min Read
ITPro Today logo in a gray background | ITPro Today


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.



Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like