title: Batch File - Using For & Xcopy Getting Invalid Number of Parameters (Not Quotes)?
body: <p>Basically what I'm trying to do is make a batch file that will run through the computer and grab everything from the Desktops and My Documents of ever user on the computer. Thing is, I won't know every users name because it will be used on unknown computers to back up. Trying to find a way to copy these things but so far I can not. I've been working on My Documents and I keep getting a "Invalid number of parameters".</p>
  
  <pre><code>@echo off
  echo This script will copy all of the files from my documents onto a C drive.
  pause
  md "C:\TestForWork"
  pause
  for /D /r %%G in ("C:\Users") DO for /D /r "%%H" in ("%%G\My Documents\") do xcopy %%H /e /y "C:\TestFor Work"
  pause
  </code></pre>