Computing.Net > Forums > Programming > Ping unitl reply

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

Reply to Message Icon

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 .

Thanks



Sponsored Link
Ads by Google

Response Number 1
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


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


Continue after batch comm... programming for newbies



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Ping unitl reply

Mechanix2 - Need batch help www.computing.net/answers/programming/mechanix2-need-batch-help/15171.html

Batch, line by line files. www.computing.net/answers/programming/batch-line-by-line-files/19580.html

Ping Monitoring Batch File www.computing.net/answers/programming/ping-monitoring-batch-file/15405.html