title: How do i use XCOPY with spaces in both paths, even with quotes?
body: <p>I am trying to create a batch file that copies files from one path to another, using several xcopy commands. However, the batch script fails because Xcopy apparently has the wrong number of parameters.</p>
  
  <p>I believe the reason is that it thinks the spaces in my folder paths are separating parameters- but I do not know why it is doing this because I have made sure that both the source and destination paths are surrounded with double-quotes.</p>
  
  <p>for example, I run this command in my batch script:</p>
  
  <pre><code>c:/windows/system32/xcopy.exe "H:\some path with spaces\myfile.txt" "H:\some path with spaces\a_different_folder\myfile.txt" /Y
  </code></pre>
  
  <p>and it outputs this:</p>
  
  <pre><code>Invalid number of parameters
  </code></pre>
  
  <p>Can somebody please tell me what I'm doing wrong or if there is a workaround?
  I have also tried using the standard copy command, but that ends up saying the system cannot find the path specified (which isn't true, as my batch file is actually generated by a script that uses the paths of files that are guaranteed to exist)</p>