SoFunction
Updated on 2025-03-10

Batch processing implements ping data Chinese version


@echo off
color f2
echo.
set for=
set of=
set with=
set in=(
set data:=Data
set million-seconds:= units of milliseconds)
set Approximate=approximate
set times=time:
set round=Back and go
set trip=Itinerary
set Reply=Reply
set from=from
set bytes=byte
set time=time:
set timed=time
set out=Over
set statistics=statistics
set Packets:= package:
set Sent=Sent=
set Received=Received=
set Lost=lost=
set loss)=lost)
set Minimum=minimum=
set Maximum=maximum=
set Average=Average=
set TTL=TTL=
setlocal enabledelayedexpansion
set a=
set/p a=Please enter the URL or IP to ping
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=time! && echo !ret!) else echo.
)
pause>nul