Sending command output to BOTH screen and file

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
jharris
Posts: 4
Joined: 18 May 2010 00:55

Sending command output to BOTH screen and file

#1 Post by jharris » 18 May 2010 01:02

There are times when I would like to send the standard output of a lengthy command to the screen and also capture it in a file. The reason is that the single command may take minutes to complete so I want to provide some progress indicators. But I also need to parse the results after it has finished to check for errors.

I know I could re-direct the output to a file and then "type" the file after the command finishes. But that doesn't give me the on-screen status indication I am looking for.

Is there any simple way to do this? The commands are Perforce operations if that makes a difference.

Thanks!

!k
Expert
Posts: 378
Joined: 17 Oct 2009 08:30
Location: Russia

Re: Sending command output to BOTH screen and file

#2 Post by !k » 18 May 2010 02:37


Post Reply