1.新建文本文档.txt打开并复制保存以下代码!
@echo off
setlocal enabledelayedexpansion
(for /f “delims=” %%i in ('dir /s/b/l/ad') do (
cd "%%~fsi"
set/a a=0,n=0
for /f "delims=" %%a in ('dir /b/l/aa') do (
set/a a+=1,n+=%%~za 2>nul
)
set/a n/=1048576
echo.%%~fi : !a! : !n!MB
)) >统计结果.txt
pause
重命名文档将.txt修改成.bat然后放到你要统计的文件夹中双击,即可看到一个新的统计结果.txt