Remove directories recursively - Similar to rd /r obj

/ Published in: DOS Batch
Save to your folder(s)

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

Copy this code and paste it in your HTML
  1. for /f %%D in ('dir/s/b/ad ^| find/i "obj" ') do rd/s/q %%D


Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.