2007-12-10

Ping + Log

有一次為了紀錄某IP的網路Ping Log,查了老半天的網頁資料,終於搞定了,記錄下來

若有有緣人發現,並且合用,就請自便吧!!

副檔名 .Bat

內容
set f=
set date=

set date=%date:/=-%
set f=%date%.log

echo - >> "%f%"
echo - >> "%f%"
echo -----------Ping Record----------- >> "%f%"
date /t >> "%f%"
time /t >> "%f%"
ping -n 10 -l 1024 www.yahoo.com >> "%f%"
echo -----------Ping Record----------- >> "%f%"

配合Windows的排程去設定定時執行,就可以得到 每天一個檔,檔案內有定時Ping的資料了

沒有留言: