網管常需掃描特定網段找出未使用的 IP 位址。WinXP 專業版可撰寫批次檔自動化此工作,輸出時間戳記與可用 IP 清單,重複使用極便利。

推薦下載:WinXP 兒童歡樂版
@echo off
date /t > IPList.txt
time /t >> IPList.txt
echo =========== >> IPList.txt
for /L %%f in (1,1,254) do (
ping -n 1 -w 200 192.168.1.%%f | find "TTL=" >nul
if errorlevel 1 echo 192.168.1.%%f 可用 >> IPList.txt
)
cls
echo 掃描完成!
notepad.exe IPList.txt
IPTracker.bat(編碼 ANSI)。for /L %%f in (1,1,254):掃描 1~254,單行指令,不可換行。ping -n 1 -w 200:單封包、200ms 逾時,平衡速度與準度。IPList.txt 含日期、時間、分隔線,便於歸檔比對。