Need some help from an MS DOS or batch file wizard

malcyboodmalcybood Member Posts: 900 ■■■□□□□□□□
I'm trying to create a batch file that will ping multiple sites and export the results for all sites into a single text document.

I've got the multiple ping part done but can't figure out how to export all results to a single file. The basis of the code is:
@echo off

echo=PINGING 10.9.10.1
echo=
echo=
ping.exe 10.9.10.1 >Server1.txt

echo=PINGING 10.40.10.1
echo=
echo=
ping.exe 10.40.10.1 >Server1.txt

This method exports the results to Server1.txt but Server2's output overwrites the Server1 output in the file.

I can export them to indicidual files but I'd prefer the output to be in one file as there is 23 core sites we want to do this test for.

If anyone can help let me know and we can take it offline from the forums via email.

Cheers
Malc

Comments

  • ajs1976ajs1976 Member Posts: 1,945 ■■■■□□□□□□
    Did a quick google search and it looks like using >> instead of just > will append the text to the file instead of overwriting.
    Andy

    2020 Goals: 0 of 2 courses complete, 0 of 2 exams complete
Sign In or Register to comment.