title: Using white spaces in an rsync file path excecuted in a batch file
body: <p>So I'm using <code>rsync</code> to back up some commonly used directories, using a batch script and windows scheduler as seen here:</p>
  
  <p><code>rsync.bat</code></p>
  
  <pre><code>@echo off
  
  C:
  chdir C:\Cygwin\bin
  
  bash --login -i -c %1
  </code></pre>
  
  <p>I'm using Windows Scheduler to run this batch script on regular intervals, which works perfectly - until I add spaces into the file paths. Here's an example of the target paths I use on the batch file shortcuts:</p>
  
  <p>Target: <code>C:\Cygwin\scripts\rsync.bat "rsync -vruh /cygdrive/t/uploads /cygdrive/d/Backups"</code></p>
  
  <p>That works perfectly. Here's the one with whitespaces:</p>
  
  <p>Target: <code>C:\Cygwin\scripts\rsync.bat "rsync -vruh '/cygdrive/c/Users/username/My Documents' /cygdrive/d/Backups"</code></p>
  
  <p>Note the single quotes on the first path with whitespaces. I  can't for the life of me figure out why this won't work - I've tried backslash escaping the whitespaces, using the -s  switch, which some research solved this problem in the past, but alas, that didn't work either. Anyone know how to get this to work?</p>