Yashy
asked on
Batch file to ping multiple IP's and output to text
Hi guys,
I wanted to have a batch file that will ping multiple IP addresses just once, and then will output the results out in a text file.
Are you able to help me with that?
Thanks for looking.
Yash
I wanted to have a batch file that will ping multiple IP addresses just once, and then will output the results out in a text file.
Are you able to help me with that?
Thanks for looking.
Yash
ASKER
I don't have anything at the moment. There's too many variations out there which I'm looking at and I haven't selected any at the moment.
@echo off
ping 111.222.123.102 > x.txt
ping 8.8.8.8 >> x.txt
REM add more ...
type x.txt
del x.txt
:exit
Sara
use ping -n 1 ip.ad.re.ss to ping once.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Have you considered using a utility to do this? There are a lot of tools for pinging ranges or lists of computers, and reporting results, and a number of these are free or have a free version. Might be more dependable and friendly than a script approach.
Here are a few I have used in the past, but a little google search will probably turn up some others, or some solution searching right here on Experts Exchange.
It it truly has to be a BAT file approach, there are a lot of good ideas and approaches in these previously answered questions, take a look and see what you can re-use...
»bp
Here are a few I have used in the past, but a little google search will probably turn up some others, or some solution searching right here on Experts Exchange.
- Angry IP Scanner - the original IP scanner for Windows, Mac and Linux
- Advanced IP Scanner - Download Free Network Scanner
- PingInfoView - Ping to multiple host names/IP addresses
- Ping Tools, Ping IP Tools, Ping Software for Network Engineer - Colasoft
It it truly has to be a BAT file approach, there are a lot of good ideas and approaches in these previously answered questions, take a look and see what you can re-use...
- How do I use excel to ping computers on the network.
- Windows Batch: ping multiple IP's ouput results in a txt file
- Windows batch: ping & traceroute based on config file
- Need a batch for ping multipal IP
»bp
ASKER
thanks for your input.
I should have been clearer. We're going to be going a router change and it's our MPLS router. The engineer is only going to be on the phone over the other side. They have messed up routes before and hence I want one of my guys on the other side pinging ALL of our gateway IP's to ensure that the MPLS routing has not been affected and that each site is reachable.
I wanted to have a batch file my guy double clicks on, then opens the text file to see the result. Ideally all will return with 'alive' or 'responding'. There's around 20 IP's, so I didn't want him to keep on doing singular pings. Instead, I wanted him to just double click a batch file, which would then do the pinging and return the results in that text file?
I should have been clearer. We're going to be going a router change and it's our MPLS router. The engineer is only going to be on the phone over the other side. They have messed up routes before and hence I want one of my guys on the other side pinging ALL of our gateway IP's to ensure that the MPLS routing has not been affected and that each site is reachable.
I wanted to have a batch file my guy double clicks on, then opens the text file to see the result. Ideally all will return with 'alive' or 'responding'. There's around 20 IP's, so I didn't want him to keep on doing singular pings. Instead, I wanted him to just double click a batch file, which would then do the pinging and return the results in that text file?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Bill, thank you for the feedback.
Thank you all for the input.
Thank you all for the input.
Welcome.
»bp
»bp
What have you so far?