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
For the solution in batch. I am using the following command:
FOR /D /R %%G in (obj,bin) DO @IF EXIST %%G IF %%~aG geq d RMDIR /S /Q "%%G"
The reason not using DIR /S /AD /B xxx
1. DIR /S /AD /B obj
will return empty list (at least on my Windows10)
2. DIR /S /AD /B *obj
will contain the result which is not expected (tobj folder)