Posted By

jimfred on 12/22/08


Versions (?)

Remove directories recursively - Similar to rd /r obj

 / Published in: DOS Batch


Although file wildcards can be used to delete files recursively, it's not as simple for directories. This example will recursively remove 'obj' directories.

  1. for /f %%D in ('dir/s/b/ad ^| find/i "obj" ') do rd/s/q %%D

Report this snippet  

You need to login to post a comment.