title: PowerShell and Robocopy - filename incorrect when trying to pass variable folder as destination
body: <p>I'm trying to use a PowerShell script running Robocopy<code>*</code> to back some files up to a newly-made directory:</p>
  
  <pre><code>$Timestamp = Get-Date -format ddMMyyyy
  
  $DestFolder = "`"\\NASBOX\Archives\$Timestamp\`""
  $SourceFolder = "`"\\DESKTOP\d$`""
  
  ROBOCOPY $SourceFolder $DestFolder /COPYALL /B /R:10 /W:90 /LOG:$Timestamp.txt /FP /TEE
  </code></pre>
  
  <p>This gives me the following error:</p>
  
  <pre>2018/01/23 16:26:20 ERROR 123 (0x0000007B) Accessing Destination Directory \\NASBOX\Archives\23012018" \COPYALL \B \R:10 \W:90 \LOG:23012018.txt \FP \TEE\
  The filename, directory name, or volume label syntax is incorrect.
  </pre>
  
  <p>I've tried a few different methods, including passing the arguments as an array. Every single thing I've tried results in the exact same error.</p>
  
  <p>I roughly understand why this is happening, but despite ~two hours spent online I can't find a solution that works in my specific context.</p>
  
  <p>Where am I going wrong?</p>
  
  <p><code>*</code> I tried using Copy-Item but there are some super long directory paths on this desktop's "D" drive.</p>