cmd: How to "tee" output?

M

Me

In a DOS window (click on Start / Run and enter "cmd"),
I want the output of the command to go to both a file
and the display.

In UNIX, I would do "foobar | tee out.txt".

What is the equivalent for "cmd"?
 
T

Torgeir Bakken \(MVP\)

Me said:
In a DOS window (click on Start / Run and enter "cmd"),
I want the output of the command to go to both a file
and the display.

In UNIX, I would do "foobar | tee out.txt".

What is the equivalent for "cmd"?
Hi

Nothing builtin for this, but you can use free 3rd party utilities
for this, here is a couple of examples:

MTEE Commandline Standard Stream Splitter
http://www.commandline.co.uk/mtee/index.html

Tee is also in the "GNU utilities for Win32" at
http://unxutils.sourceforge.net
 
E

Enkidu

In a DOS window (click on Start / Run and enter "cmd"),
I want the output of the command to go to both a file
and the display.

In UNIX, I would do "foobar | tee out.txt".

What is the equivalent for "cmd"?

foobar > out.txt
type out.txt | more

Cheers,

Cliff
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top