driconmax driconmax - 1 year ago 162
Bash Question

Resize Command prompt on bat file

Is there any way to start a .bat file and resize the window to a custom size from the code? I don't want to change it from the cmd.exe file because i want it to be dynamic (I want to make a few .bat with different sizes)


rem **Something to resize here**

rem Rest of the code...



Answer Source

You can use:

mode con:cols=80 lines=40

which I found here. You can modify the numerical values to your specific needs.

I can't test it right now, because I'm on Linux, but I know I used to do the same thing using mode con.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download