Solved

How do I redirect batch output to a file (But still see the output).

Posted on 2011-03-05
2
610 Views
Last Modified: 2012-05-11
I a running a batch fille.
The batch file has some output. So, I want to save the output to a file (Also error messages, also "batch questions").
BUT, I also want to see the output, so I can answer the "batch questions" and also monitor the batch progress.

Thanks zmau
0
Comment
Question by:zmau
2 Comments
 
LVL 69

Accepted Solution

by:
Qlemo earned 250 total points
ID: 35044409
You need a 3rd-party tool called tee. Any implementation will do, for example this one: http://www.softpedia.com/get/System/System-Miscellaneous/Wintee.shtml

Using that, you can do
   batchfile 2>&1 | tee LogFile.txt
Which should redirect errors and any other output to both the screen and the log file.
0
 
LVL 1

Author Closing Comment

by:zmau
ID: 35044429
Thanks
Amazing that windows does not allow this............
0

Featured Post

Create the perfect environment for any meeting

You might have a modern environment with all sorts of high-tech equipment, but what makes it worthwhile is how you seamlessly bring together the presentation with audio, video and lighting. The ATEN Control System provides integrated control and system automation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, I will show you HOW TO: Perform a Physical to Virtual (P2V) Conversion the easy way from a computer backup (image).
A project that enables an administrator to perform actions within a user session context not just at the time of login but any time later on day(s) or week(s) later.
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question