How to change Screen buffer size in Windows Command Prompt from batch script

后端 未结 14 1554
清歌不尽
清歌不尽 2020-12-02 09:59

I know you can do right click properties ->layout and there change it manually.

But how would you go about changing it from a Windows batch script?

I know yo

14条回答
  •  爱一瞬间的悲伤
    2020-12-02 10:32

    There is no "DOS command prompt". DOS fully died with Windows ME (7/11/2006). It's simply called the Command Prompt on Windows NT (which is NT, 2K, XP, Vista, 7).

    There is no way to alter the screen buffer through built-in cmd.exe commands. It can be altered through Console API Functions, so you might be able to create a utility to modify it. I've never tried this myself.

    Another suggestion would be to redirect output to both a file and to the screen so that you have a "hard copy" of it. Windows does not have a TEE command like Unix, but someone has remedied that.

提交回复
热议问题