doejoe
doejoe

Reputation: 165

How to get scrolling back after setting width/height for cmd.exe?

I have a batch script that will display long strings of text. I want the batch script to open in a certain width, and the height at a certain height.

I have this:

MODE 200, 100
python run_program.py

The width is perfect, but now cmd.exe loses its ability to scroll vertically. I cannot scroll up to see the data unless I remove the 100 part. But if I remove the height, cmd.exe will just open up to the max height of my monitor.

I just want to open up cmd in my custom resolution: 200,100 but with scrolling. Is there any way to do that in cmd.exe?

Please note I am using ONLY the base system cmd.exe, and NOT powershell or any other console program for Windows.

Upvotes: 1

Views: 793

Answers (1)

OJBakker
OJBakker

Reputation: 782

Mode will set both the height/width of the console window and the screen buffer. That explains why you lose the scrollbar. You can create a shortcut to cmd.exe and in the settings of the shortcut change height/width of the cmd-windows and/or height/width of the screenbuffer.

Upvotes: 1

Related Questions