回复 3# ysrr2011
2楼 这句改这样试呢?- for /f "delims=." %%b in (%%a) do set /a n[%%a]+=%%b
复制代码 或下面这样呢- @echo off&setlocal enabledelayedexpansion
- (for /f "delims=" %%a in ('dir /b *.txt^|find /v "a.txt"') do (
- set /a m=n=0
- for /f "usebackq" %%b in ("%%a") do set /a m+=1,n+=%%b 2>nul
- set /a m=n/m
- echo %%~na : !n! 平均值 : !m!
- ))>a.txt
复制代码
|