@echo off for /f "tokens=*" %%i in ('dir/s/b/ad^|sort /r') do rd "%%i" 使用脚本对空文件夹进行处理 将上述代码放进txt文件当中,记得把txt后缀改成dat