- Joined
- Feb 19, 2006
- Messages
- 540 (0.08/day)
Processor | Intel i7 920 |
---|---|
Motherboard | ASUS RAMPAGE II Extreme |
Cooling | CM v10 |
Memory | Corsair 3 x 2GB TR3X6G1866C9DF |
Video Card(s) | Nvidia XFX 8800GT Stock |
Storage | Seagate ST3500320AS, 2 x Samsung HD103UJ |
Display(s) | 2408WFP |
Case | Corsair 800D |
Power Supply | Corsair HX750W |
Hi Guys,
I need some help writing a batch file to test network connectivity for various locations.
Basically we are transitioning to from an existing network provider to a new network provider.
What I would like the script to do
Ping a list of IP address and then output the results into a simple text file of each IP Address.
The text file ideally should just display
something along the lines of
ping www.google.com Successful
or
ping www.google.com Unsuccessful
This is what I have so far but it is a bit broken.
I'm not sure how to do a IF NOT command and make it jump to the next line.
Thanks!
I need some help writing a batch file to test network connectivity for various locations.
Basically we are transitioning to from an existing network provider to a new network provider.
What I would like the script to do
Ping a list of IP address and then output the results into a simple text file of each IP Address.
The text file ideally should just display
something along the lines of
ping www.google.com Successful
or
ping www.google.com Unsuccessful
This is what I have so far but it is a bit broken.
Code:
@echo off
Title Cut over to Telstra Check
set OutputFile=result.txt
cd\
CLS
Echo. Cut over test
Echo.
Echo. Ping all sites
Pause
Ping www.google.com.au | find "Reply"
echo ping to google successful >>"C:\nettest\OutputFile.txt"
IF NOT echo ping to google unsuccessful >>"C:\nettest\OutputFile.txt"
Ping www.techpowerup.com | find "Reply"
echo ping to TechPowerup successful >>"C:\nettest\OutputFile.txt"
IF NOT echo ping to Techpowerup unsuccessful >>"C:\nettest\OutputFile.txt"
pause
I'm not sure how to do a IF NOT command and make it jump to the next line.
Thanks!