分開 ping 多個 IP 並記錄 log。

@echo off
@set pi=C:\WINDOWS\system32\ping.exe
@set log1=D:\bat\log\flyfox-12040-%date:~0,4%%date:~5,2%%date:~8,2%-%time:~0,2%%time:~3,2%%time:~6,2%.log
@set log2=D:\bat\log\flyfox-12149-%date:~0,4%%date:~5,2%%date:~8,2%-%time:~0,2%%time:~3,2%%time:~6,2%.log
@set log3=D:\bat\log\flyfox-12116-%date:~0,4%%date:~5,2%%date:~8,2%-%time:~0,2%%time:~3,2%%time:~6,2%.log
@set log4=D:\bat\log\flyfox-12110-%date:~0,4%%date:~5,2%%date:~8,2%-%time:~0,2%%time:~3,2%%time:~6,2%.log
@set log5=D:\bat\log\flyfox-12052-%date:~0,4%%date:~5,2%%date:~8,2%-%time:~0,2%%time:~3,2%%time:~6,2%.log
@set log1=%log1: =0%
@set log2=%log2: =0%
@set log3=%log3: =0%
@set log4=%log4: =0%
@set log5=%log5: =0%
@%pi% 10.76.29.225 -n 3 > %log1%
@%pi% 20.18.135.39 -n 3 > %log2%
@%pi% 22.46.78.100 -n 3 > %log3%
@%pi% 20.76.56.37 -n 3 > %log4%
@%pi% 20.46.75.53 -n 3 > %log5%
@echo on
@exit

flyfox 發表在 痞客邦 PIXNET 留言(0) 人氣()