Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a command which I need to inspect in real time (i.e. see its output in the command prompt MyProgram.exe) and to have a log file for later inspection (MyProgram.exe > log.txt)



How can I make a single instance of the program to write to both outputs?

share|improve this question

closed as off-topic by HopelessN00b Dec 5 at 20:47

  • This question does not appear to be about professional server, networking, or related infrastructure administration within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

    
Closed due to the high number of low quality, "use this product" answers. –  HopelessN00b Dec 5 at 20:47

3 Answers 3

up vote 10 down vote accepted

Either use one of many tee clones for Windows.

Or if you're using PowerShell, you can use Tee-Object.

share|improve this answer
    
maybe you could demo this? –  Aaron Hall Dec 5 at 20:46

You want a unix tee clone like this one or this one. I'm sure there are others, but, well, your Google for 'windows tee' is as good as mine.

share|improve this answer

See same question on stackoverflow.com

share|improve this answer
    
This is a comment, not an answer. –  Aaron Hall Dec 5 at 20:45

Not the answer you're looking for? Browse other questions tagged or ask your own question.