title: xcopy isn't working in my batch file, and I am not sure why?
body: <p>First time poster here! I usually lurk for answers but seeing as I've been getting a headache on this and I really want this done for my boss I wanted to directly ask and see if anyone can spot what is wrong with my script.</p>
  
  <pre><code>    @echo off
      for /f "tokens=2 delims==" %%a in ('wmic OS Get localdatetime /value')do set "dt=%%a"
      set "YY=%dt:~2,2%" &amp; set "YYYY=%dt:~0,4%" &amp; set "MM=%dt:~4,2%" &amp; set "DD=%dt:~6,2%"
      set "HH=%dt:~8,2%" &amp; set "Min=%dt:~10,2%" &amp; set "Sec=%dt:~12,2%"
  
      set "datestamp=%YYYY%%MM%%DD%" &amp; set "timestamp=%HH%%Min%%Sec%"
      set "fullstamp=%YYYY%-%MM%-%DD%_%HH%-%Min%-%Sec%"
  
      set "new_name=PayCase_%fullstamp%"
  
      echo datestamp: "%datestamp%"
      echo timestamp: "%timestamp%"
      echo fullstamp: "%fullstamp%"
  
      move /-y "E:\RFT workspace folder\PayCase_Project_Playground_logs\PayCase_ScriptLog" "%~dp0\Log Archive\%new_name%"
  
      xcopy /e "%~dp0\Log Archive\%new_name%" "%~dp0\Log Archive\sendFolder"
  
      pause
  
      EXIT
  </code></pre>
  
  <p>This first part of the script just gets today's date and time and sets it to a var called 'new_name' (it's not my code, got it from somewhere, I forget where). The latter part, moves the contents of the folder from one place to another, then it is suppose to copy those contents to another place in the drive.</p>
  
  <p>Can someone help me figure out why my code is not copying the contents to my sendFolder?</p>