Posted By

jimfred on 12/22/08


Tagged


Versions (?)

Remove directories recursively - Similar to rd /r obj


 / Published in: DOS Batch
 

URL: http://www.experts-exchange.com/Programming/Languages/Scripting/Shell/Batch/Q_23740037.html

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.