title: Move files to folders with same name in Windows
body: <p>I use following command to copy files to folders with same name.</p>
  
  <pre><code>for /f %x in ('dir /ad /b') do move %x*.* %x\
  </code></pre>
  
  <p>I use <code>move %x*.* %x\</code> to move the files to given directory. It doesn't work for files, which has spaces in their filenames, but not sure what to change.</p>