DOS batch with double output redirection

Posted on 2012-09-11
Last Modified: 2012-09-11

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
Question by:helpdti
    LVL 14

    Expert Comment

    If you are using a powershell script you may use:

    your_command | Tee-Object -file c:\tmp\mylogfile.txt
    LVL 5

    Accepted Solution

    You can use the Tee command to perform the Double Output.

    The GNU tool collection is always a good choice:

    The tee implementation is part of the core package:



    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    Join & Write a Comment

    One of the features I've come to appreciate about Windows 7 and Windows Server 2008 R2 is the ability to pin applications to the task bar. As useful a feature as I've found this, it does have some quirks.  For example, have you ever tried pinning an…
    If you get continual lockouts after changing your Active Directory password, there are several possible reasons.  Two of the most common are using other devices to access your email and stored passwords in the credential manager of windows.
    This Micro Tutorial will teach you how to the overview of Microsoft Security Essentials. This is a free anti-virus software that guards your PC against viruses, spyware, worms, and other malicious software. This will be demonstrated using Windows…
    This Micro Tutorial will go in depth within Systems and Security in Windows 7 and will go into detail regarding Action Center, Windows Firewall, System, etc. This will be demonstrated using Windows 7 operating system.

    746 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

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now