Ping results are displayed in Chinese. bat
Copy Code code as follows:
@echo off
Color F2
Echo.
Set for= in
Set of=.
Set With= with
Set in= (in
Set data:= data
Set milli-seconds:= milliseconds)
Set approximate= approx.
Set times= time:
Set round= back and forth
Set trip= Stroke
Set reply= Answer
Set from= from
Set bytes= bytes
Set time= time:
Set timed= time
Set out= over
Set statistics= Statistics
Set packets:= Package:
Set sent= sent =
Set received= received =
Set lost= is missing =
Set loss) = missing)
Set minimum= Minimum value =
Set maximum= Maximum value =
Set average= average =
Set ttl=ttl=
Setlocal enabledelayedexpansion
Set a=
set/p a= Please enter the URL or IP you want to ping
for/f "delims="%%i in (' ping%a% ') does (
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= time! && Echo!ret!) else Echo.
)
Pause>nul