title: Delete sub directories older than 30 days
body: <p>I'm trying to create a batch script that will delete all sub directories which are older than 30 days.
  I'm really new to batch scripting so I'm just hoping that someone can help me out on this.</p>
  
  <p>I was able to find a script that delete all sub directories in specified location. </p>
  
  <pre><code>@for /f "tokens=*" %%a in ('dir /s /b "C:/temp/test" 2^&gt;NUL') do rd /s /q "%%a"
  </code></pre>
  
  <p>Can someone tweak this script so it deletes only directories which are 30 days old?</p>