setlocal enabledelayedexpansion set "folderPath=.\" :: 替换为你的文件夹路径 for /d /r "%folderPath%" %%D in (Objects) do ( echo Deleting folder: %%D rmdir /s /q "%%D" ) for /d /r "%folderPath%" %%D in (Listings) do ( echo Deleting folder: %%D rmdir /s /q "%%D" )