@Echo OffSet f=D:\Test1Rem 设置文件夹路径For /f "tokens=*" %%i in ('dir /os /b /s "%f%\*.txt"') do (If "%%~zi"=="0" (Del /q /f "%%i"))Pause