批處理實(shí)現(xiàn)ping數(shù)據(jù)中文版
更新時(shí)間:2009年06月02日 18:49:57 作者:
將ping返回的數(shù)據(jù),中文化輸出。
復(fù)制代碼 代碼如下:
@echo off
color f2
echo.
set for=于
set of=的
set with=用
set in=(以
set data:=數(shù)據(jù)
set milli-seconds:=毫秒為單位)
set Approximate=大約
set times=時(shí)間:
set round=來(lái)回
set trip=行程
set Reply=應(yīng)答
set from=來(lái)自
set bytes=字節(jié)
set time=時(shí)間:
set timed=時(shí)間
set out=超過(guò)
set statistics=統(tǒng)計(jì)
set Packets:=包:
set Sent=已發(fā)送=
set Received=已收到=
set Lost=已丟失=
set loss)=丟失)
set Minimum=最小值=
set Maximum=最大值=
set Average=平均值=
set TTL=TTL=
setlocal enabledelayedexpansion
set a=
set/p a=請(qǐng)輸入要ping的網(wǎng)址或IP
for /f "delims=" %%i in ('ping %a%') do (
set ret=
for %%a in (%%i) do if defined %%a (set ret=!ret!!%%a!) else set ret=!ret! %%a
if not "!ret!"=="" (set ret=!ret:time=時(shí)間! && echo !ret!) else echo.
)
pause>nul
相關(guān)文章
批處理的api WMIC學(xué)習(xí)體會(huì)有感
上期的專(zhuān)欄里,NP給大家寫(xiě)了一篇很精彩也很有實(shí)際應(yīng)用效果的批處理教程。這期,我給大家講一下最近我學(xué)習(xí)wmic的體會(huì)。2008-06-06
windows服務(wù)操作之刪除服務(wù) 批處理實(shí)現(xiàn)
用批處理實(shí)現(xiàn)的刪除服務(wù)器的方法,其實(shí)就是利用了批處理下的sc命令。2009-03-03
CMD下讀取/修改/刪除注冊(cè)表項(xiàng)的方法
先說(shuō)注冊(cè)表。很多命令行下訪(fǎng)問(wèn)注冊(cè)表的工具都是交互式的,溢出產(chǎn)生的shell一般不能再次重定向輸入/輸出流,所以無(wú)法使用2012-06-06

