Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學
您现在的位置: Windows教程網 >> Windows教程 >  >> Windows 綜合教學 >> 關於 Windows

WinXP 追蹤 IP 位址範圍 批次檔自動記錄未使用 IP

編輯:關於 Windows

在 WinXP 下需追蹤特定 IP 範圍內未被使用的位址,可建立批次檔自動化處理。以 192.168.1.1 至 192.168.1.100 為例:

  1. 開啟記事本,輸入以下指令(需為單行,以 && 連接):
@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
  1. 存檔為 IPTracker.bat 並執行,結果將輸出至 IPList.txt,僅列出未回應的 IP。須將範例 IP 替換為實際網段。

此法亦適用於 Win7 等較新系統,參考價值高。

Copyright © Windows教程網 All Rights Reserved