I work with multiple projects, and I want to recursively delete all folders with the name \'bin\' or \'obj\' that way I am sure that all projects will rebuild everything (so
This worked for me:
for /d /r . %%d in (bin,obj) do @if exist "%%d" rd /s/q "%%d"
Based on this answer on superuser.com