CODE: [Copy to clipboard]@echo off for /f %%i in ('dir /s c:\windows\*.exe^|findstr "个文件"') do set a=%%i echo 总共有 %a% 个文件 pause