Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simple Batch Question

Status
Not open for further replies.
Aug 19, 2003
50
0
0
US
This isn't a VBScript question, but I didn't know where else to post it. It should be simple however, for folks with a scripting background. Basically, I just want to create a batch file to ping all of my servers, and then print the ping results to a text file. For some reason I can't get it to write to the text file correctly. Any help would be appreciated, thanks
 
To put all the results in one file, use:

ping 10.1.1.114 > c:\pc1.txt
ping 10.1.1.132 >> c:\pc1.txt

The single > deletes the contents of any file by that name that exists, where the double >> appends to the file, creating it if it doesn't already exist.

Lee
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top