For a "closed" range of IP addresses use FOR /L:
FOR /L %%A IN (1,1,254) DO CALL :Check 10.0.0.%%A
FOR /L %%A IN (1,1,254) DO CALL :Check 10.0.1.%%A
GOTO:EOF
Otherwise, create a file called addresses.lst and use FOR /F:
FOR /F %%A IN (addresses.lst) DO CALL :Check %%A
GOTO:EOF
The :Check subroutine could be something like this:
:Check
PING %1 | FIND "TTL=" >NUL
IF ERRORLEVEL 1 (CALL WarnTechSupport.bat) ELSE (ECHO %1 is on
the air)
GOTO:EOF
(Command lines are indented by a TAB or 5 spaces, if not the line is
the continuation of the previous line).
This batch file does NOT stop at every IP address that's OK, if you
want that replace the "ELSE part".
Good luck,
Rob van der Woude
Joe <.dc...@hotmail.com> wrote in
<rcpket42svmqr0fqo...@4ax.com>:
--
-----------------------------
Rob van der Woude
http://www.robvanderwoude.com