title: Batch file moving files with spaces in their name.
body: <p>My hope is that some can help me out I've spent the last few days searching Google for answers and not getting anywhere. I have a two part code fist pulls everything out of sub-folders and then the second part moves those files by type into other folders located else where. I can get the code to work in a test set up, but it wont on the files I'm trying to move. I think it has to do with the names of the files having spaces in them, but I am not sure. Here are the codes. thanks guys!</p>
  
  <p>Part one </p>
  
  <pre><code>FOR /R C:\Users\Laptop02\Desktop\Folder 1 Test  %%i IN (*.*) DO MOVE %%i C:\Users\Laptop02\Desktop\Folder 1 Test
  </code></pre>
  
  <p>Second Part</p>
  
  <pre><code>@echooff
  set media=C:\Users\Laptop02\Desktop\Foder 2 Test
  set jpg=C:\Users\Laptop02\Desktop\Foder 2 Test\mediadata
  set xml=C:\Users\Laptop02\Desktop\Foder 2 Test\mediadata
  
  move %dlDir%*.avi %media%
  move %dlDir%*/*.avi %meia%
  move %dlDir%*.mp4 %media%
  move %dlDir%*/*.mp4 %media%
  move %dlDir%*.mkv %media%
  move %dlDir%*/*.mkv %media%
  move %dlDir%*.jpg %jpg%
  move %dlDir%**.xml %xml%
  </code></pre>
  
  <p>Thanks again. </p>