本帖最后由 77七 于 2023-2-1 16:23 编辑
- @echo off
- echo 文件名,大小>>list.csv
- for /f "delims=" %%i in ('dir /b /a-d ^| findstr /v "%~nx0" ^| findstr /v "list.csv"') do (
- set "size=%%~zi"
- set "name=%%~ni"
- setlocal enabledelayedexpansion
- set /a size=size/1024/1024
- echo !name!,!size! MB
- endlocal
- )>>list.csv
- pause
复制代码
|