Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Ping unitl reply
Name: ryanpete Date: February 26, 2007 at 07:48:21 Pacific OS: Xp Sp2 CPU/Ram: 2.99/512 Product: Dell/Optiplex GX520
Comment:
I need to write a batch script that will ping %IP% that is set previously in the program, unitl a sucessful reply is recived. any help would be great .
Name: tonysathre Date: February 26, 2007 at 09:09:38 Pacific
Reply:
Try this:
::==pinger.bat @echo off echo Enter IP Address set /p ip= :ping ping -n 1 %ip% | find "Reply" > nul if errorlevel 1 echo No Reply && goto ping if errorlevel 0 echo Host Found && goto eof
"Computer security." — Oxymoron
0
Response Number 2
Name: ryanpete Date: February 26, 2007 at 14:15:14 Pacific
Reply:
That didn't work all I get after entering IP is the blinking cursor of death....
0
Response Number 3
Name: Shr0Om Date: February 28, 2007 at 06:38:08 Pacific
Reply:
@echo off set /p IP=IP to ping?: ping %IP%>nul if errorlevel 1 (echo No reply from %IP%) else echo Got reply from %IP% pause
Summary: Hi there! Scripting a program for work but I am new to batch files and cannot get this segment to work. @echo off set N= for /f "tokens=* delims=" %%a in (computers.txt) do ( ping /n 1 %%a | find "Rep...
Summary: hi everybody! i am using some code i found in this blog from M2 to monitor some hosts through a ping, and save in a file those IPs which are not reachable. this is the code: @echo off > badhost.log fo...