title: Looping over directories in Windows XP command prompt
body: <p>I have the following command which will loop over all the subdirectories in a specific location and output the full path:</p>
  
  <pre><code>for /d %i in ("E:\Test\*") do echo %i
  </code></pre>
  
  <p>Will give me:</p>
  
  <pre><code>E:\Test\One
  E:\Test\Two
  </code></pre>
  
  <p>But how do I get both the full path, and just the directory name, so the do command might be something like:</p>
  
  <pre><code>echo %i - %j
  </code></pre>
  
  <p>And the output might be something like:</p>
  
  <pre><code>E:\Test\One - One
  E:\Test\Two - Two
  </code></pre>
  
  <p>Thanks in advance!</p>