title: No destination directory found using robocopy in batch
body: <p>I am using robocopy to copy all files and folders from one directory to another.
  The directory will be copied to a new time-stamped folder every time the script is executed.</p>
  
  <p>However I am getting the follwoing error:</p>
  
  <blockquote>
    <p>No destination directory Specfied</p>
  </blockquote>
  
  <p>Here is the code:</p>
  
  <pre><code>echo off
  
  
  set newDirectory = C:\Users\cmooney\Desktop
  
  set DirName=%date:~-4,4%.%date:~-7,2%.%date:~0,2%.%time:~0,2%.%time:~3,2%
  MD \%newDirectory%
  
  set source = C:\Users\cmooney\Desktop\FolderA
  
  
  
  rem /e copy all subdirs /z try again if fails /NMir copy only new files 
  
  robocopy %source% %DirName% /e /z /Mir
  
  
  rem leave cmd line open
  pause
  
  
  
  REM If there are no changes, robocopy will not copy anything. If you have tried 
  
  REM and it worked, .... if no changes, no file copy.
  </code></pre>
  
  <p>Any input appreciated</p>