Solved

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

Posted on 2011-03-05
2
608 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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

Suggested Solutions

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
Sometimes drives fill up and we don't know why.  If you don't understand the best way to use the tools available, you may end up being stumped as to why your drive says it's not full when you have no space left!  Here's how you can find out...
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

770 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