(本文內容與 ID 40778 重複,皆為使用批次檔 Ping 掃描取得未使用 IP 位址)
@Echo off
date /t > IPList.txt
time /t >> IPList.txt
echo =========== >> IPList.txt
For /L %%f in (1,1,100) Do Ping.exe -n 2 192.168.1.%%f | Find "Request timed out." && echo 192.168.1.%%f Timed Out >> IPList.txt && echo off
cls
Echo Finished!
@Echo on
Notepad.exe IPList.txt
IPTracker.bat,修改 IP 網段為實際環境。
注意:For...Do 命令必須寫在單一行,IP 範圍請依實際網段調整。