• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 658
  • Last Modified:

DOS batch with double output redirection

Hello,

is there a way in Windows 7 to send the output of DOS commands both to video and to file (with a single execution)?

Thank you
Best regards
0
helpdti
Asked:
helpdti
1 Solution
 
DonConsolioCommented:
If you are using a powershell script you may use:

your_command | Tee-Object -file c:\tmp\mylogfile.txt
0
 
albeloCommented:
You can use the Tee command to perform the Double Output.


The GNU tool collection is always a good choice:

http://gnuwin32.sourceforge.net/

The tee implementation is part of the core package:

http://gnuwin32.sourceforge.net/packages/coreutils.htm

Or

wintee: http://code.google.com/p/wintee/
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now