title: How to set recursive depth for the Windows command DIR?
body: <p>I'm currently using the following command to list some directories:</p>
  <pre><code>dir /b /s /AD &gt; c:\temp\dir_list.txt
  </code></pre>
  <p>This gives me almost the list that I need. But it is way too much data because some folders have lots of subfolders that I don't want to see in my listing.</p>
  <p>Is it possible to limit the recursion depth of the command to 3 (for example)?</p>
  <pre><code>c:\dir_1\dir_2\dir_3\dir_foo
  </code></pre>
  <p>So I don't want to see the directory <code>dir_foo</code> if I execute the command in the above example in <code>c:\&gt;</code>, but just the <code>dir_n</code> ones.</p>
  <p>Maybe without a batch or VB script?</p>