cmd: How to "tee" output?

  • Thread starter Thread starter Me
  • Start date Start date
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"?
 
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
 
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
 
Back
Top