Home » Questions » Computers [ Ask a new question ]

Displaying and storing Windows Batch file output

Displaying and storing Windows Batch file output

I've got a batch file written that runs a program we've developped, passing in a number of parameters. Whilst running the program in debug mode, a large number of debug messages are output, which it would be handy to review later, although I still want to be able to see the program running "live" as it were, within the cmd.exe window.

Asked by: Guest | Views: 28
Total answers/comments: 1
Guest [Entry]

"TEE for Windows
TEE enables you to redirect standard output to a file and display it on screen simultaneously.

some_program | TEE [ /D:nn ] file_name

Available as BAT, Perl and Regina scripts.

Author's note.

The Rexx and Perl scripts will start displaying the result immediately.
For the batch file, what it boils down to is, you may just as well redirect the command's output to a file and then display that file afterwards. As a bonus, that way you won't skip empty lines.

Note: These scripts were written just for fun.
Even though the do work, they cannot compete with the ""real"" stuff -- compiled executables, written in ""true"" programming languages by true programmers.

I use Cygwin.
There is also Tee utility for Windows updated"