Windows – Increase command prompt’s buffer size with a command

command linewindows

I can change the size of a Command Prompt window like this:

'mode con:cols=920 lines=40'

But how can I keep the window the same size but increase the buffer size (make the scoll bars smaller, if you follow me) from the command line?

I'm running Windows 7, but I would like a command that works in all Windows versions. It's a simple operation, so I think we're okay.

Best Answer

The mode command does not (directly) alter the size of the window, it alters the size of the buffer. If you set the numbers to something larger than the window size and it will create scrollbars as necessary. Setting it to numbers smaller than the window will remove the scrollbars and the window will shrink.

There is a StackOverflow question that gives some more solutions for finer-grained control via the registry or programming if you are interested.