15 lines
251 B
Batchfile
15 lines
251 B
Batchfile
@echo off
|
|
setlocal enabledelayedexpansion
|
|
|
|
for /l %%i in (2,1,100) do (
|
|
set "ip=10.1.2.%%i"
|
|
ping -n 1 !ip! > nul
|
|
if !errorlevel! equ 0 (
|
|
echo !ip! is reachable
|
|
) else (
|
|
echo !ip! is not reachable
|
|
)
|
|
)
|
|
|
|
endlocal
|
|
pause |