title: Delete folders with wild cards from a batch file Windows 7
body: <ol>
  <li>I know we can write programs to do it. <br/></li>
  <li>I know we can write other scripts (perl/vbscript/ etc.) to do it. </li>
  </ol>
  
  <p>I am looking for a command prompt/batch file solution to delete all folders matching <strong>sub_*</strong> (like sub_1, sub_2 ... ) to be deleted. rmdir or rd doesn't support wildcards, and I'm not able to figure out how to pipe the output of <strong>dir sub_*/ad</strong> command to <strong>delete</strong> command one by one as well. Any loop syntax etc. I can use?</p>