也许这可以帮助你,我评论了它,所以你明白它在做什么;)
:: Program to remove Folders which fullfill the criterias
:: You won't see the commands in the console
@echo off
:: Go to drive C (i think you'll need application data or similar and this is
:: on c, but if the bat is started in an other partition, it will search the
:: one he starts in
C:
:: Go to the path in which you'll search, if you want C:\ , remove this
CD "C:\yoursearchstartpath"
:: Okay, this is the loop, it gets all folders ( /A -D is for folders)
:: which have delMe in their name and then asks if you want to delete it
:: showing the path to make sure you don't delete sth accidentially
for /f "delims=" %%a IN ('dir /S /B /A -D *delMe*') do RD /S "%%a"
:: That the batch file is not closed automatically but shows that it's finished
set /p id="Finished, press Space to quit " %=%