title: Get Directories Names Only
body: <p>I have a directoy X that has say 500 subdirectories.  What I need is a quick way to just get <em>only</em> my directory and the names of these 500 subdirectories in my X directory (so, no Mode, no LastWriteTime or anything else, just the name) and pipe it to a file.</p>
  
  <p>So, for example, I have this:</p>
  
  <pre><code>-X
   |+Dir1
   |+Dir2
   |+Dir3
   |
   ...
   |+Dir500
  </code></pre>
  
  <p>What I want to get piped to a txt file is this</p>
  
  <pre><code>X/Dir1
  X/Dir2
  X/Dir3
  ...
  X/Dir500
  </code></pre>
  
  <p>How can I do this using PowerShell or CommandLine?
  I am using Windows 7 and PowerShell 4.0
  Thanks,</p>