删除包含特定字符的文件夹 set fn=ABC for /f "delims=" %%i in ('dir *%fn%* /ad/b') do rd /s/q "%%i" 上例为删除文件夹名字包含字符串ABC的文件夹