How to keep all of the output of a program on the Windows command line?

Say you have a program that gives a lot of output. It seems that Command Prompt unfortunately doesn't keep all of it (there's only so far you can scroll up).

Is there a way to keep all of it?


Solution 1:

Increasing the buffer size is the best way if you just want to scroll up and see the output, which you can configure in properties.

If you are appending to a file, you'll also probably want the errors in case there are any:

C:\>somecommand.exe > "C:\path\to\output.txt" 2>&1

If you want a pager, there is more or less for Windows.

example:

C:\>somecommand.exe | less

you can then use f to page forward or b to go backward.

Solution 2:

Are you using Windows XP if so you could append to your command | more

Alternatively you could use

command redirection operators

.
This page has more info for you.