title: Directory listing batch file
body: <p>I have this batch file code </p>
  
  <pre><code>dir /a:d /s /b | sort 
  </code></pre>
  
  <p>I can't seem to get it to output the information to a text file. I tried this</p>
  
  <pre><code>dir /a:d/s/b/o:n | sort &gt; Folder Listing.txt
  </code></pre>
  
  <p>but nothing happens. I can get the command prompt to pause on screen by doing </p>
  
  <pre><code>dir /a:d /s /b | sort
  pause 
  </code></pre>