- @echo off & cd /d "%~dp0"
- setlocal enabledelayedexpansion
- (
- for /d %%i in (*) do (
- for /f "tokens=3" %%a in ('dir /s "%%i" 2^>nul ^| findstr "个文件"') do set "size1=%%a"
- set "size=000000000000000!size1:,=!"
- echo !size:~-15!?%%i !size1:,=!
- )
- )>"_"
- ( for /f "tokens=1* delims=?" %%i in ('sort /r _') do echo %%j ) > "文件夹的大小统计结果.txt"
- del /f "_" 2>nul
- pause&exit
复制代码
|