网速批处理

@echo off
:run
for /F "tokens=2" %%i in ('netstat -e ^| find "Bytes"') do set down1=%%i
for /F "tokens=3" %%i in ('netstat -e ^| find "Bytes"') do set up1=%%i
ping -w 850 -n 1 1.1.1.1 2>nul >nul
for /F "tokens=2" %%i in ('netstat -e ^| find "Bytes"') do set /a down=(%%i-%down1%)/1024
for /F "tokens=3" %%i in ('netstat -e ^| find "Bytes"') do set /a up=(%%i-%up1%)/1024
cls
echo Down %down% KB
echo Up   %up% KB
title %down% KB Down %up% KB Up
goto:run

 

你可能感兴趣的:(网络,速度)