::@echo off
title IP 地址檢測 -- das白
::檢測此計算機是否與 172.0.0.1 - 172.0.0.39 互通 結果存入D盤 《檢測結果.txt》
set ip=127.0.0
for /l %%a in (1,1,39) do (
echo %ip%.%%a
ping %ip%.%%a -n 1 -l 1 |find /i "來自 %ip%.%%a">>D:\檢測結果.txt
)
pause
goto end
:end
@echo off
title ping包測試 -- das白
::ping不通則將時間記錄到D盤
set ip=172.0.0.1
echo 正在持續ping %ip%
:end
ping %ip% -n 4 -w 100 -l 1 |find /i "來自 %ip%"
if "%errorlevel%"=="1" (echo %time%>>D:\%ip%.txt)
echo %time%
goto end