Hello World !
分类: WINDOWS
2012-07-04 20:42:28
环境:windows7 64bit
ping ip –n
@echo off
set/p ip=IP:
set/p n=N:
echo Start time: %date% %time% >>%ip%.txt
ping.exe %ip% -n %n% >>%ip%.txt
echo End time: %date% %time% >>%ip%.txt
ping ip –t
@echo off
set/p ip=:
echo Start time: %date% %time%
ping.exe %ip% -t
echo End time: %date% %time%
pause
ping ip netseg
ping某个网段
@echo off
set/p ip=x.x.x:
set/p st=Start N:
set/p end=End N:
echo Start time: %date% %time% >>%ip%.log
for /L %%v IN (%st%,1,%end%) DO ping.exe %ip%.%%v>>%ip%.log
echo End time: %date% %time% >>%ip%.log
@echo off
set/p ip=x.x.x:
set/p st=Start N:
set/p end=End N:
echo Start time: %date% %time% >>%ip%.log
for /L %%v IN (%st%,1,%end%) DO ping.exe %ip%.%%v|find “TTL”>>%ip%.log
echo End time: %date% %time% >>%ip%.log