Created
November 25, 2014 00:18
-
-
Save RickCogley/cf819594a09e9141a6a8 to your computer and use it in GitHub Desktop.
Batch file sample to show how to create a file for capturing output, then append to that file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
# Author: Rick Cogley | |
# Last Update: 1 Nov 2014 | |
echo "== STARTING BATCH ==" | |
echo "Results from %computername%:" > results.txt | |
echo "Pinging..." >> results.txt | |
ping www.esolia.com >> results.txt | |
echo. >> results.txt | |
echo "Running SET..." >> results.txt | |
set >> results.txt | |
echo. >> results.txt | |
echo "PC info..." >> results.txt | |
echo "Computer: %computername%" >> results.txt | |
echo "Domain: %computerdomain%" >> results.txt | |
echo "== ENDING BATCH ==" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment