title: for files Invalid argument/option - '>>'
body: <pre><code>@ECHO OFF
  
  Set LOG="C:\Temp\Copy.log"
  
  ::########################
  :: Begin copying
  ::########################
  
  Set Sourcedir="c:\data\PRODDB\dir"
  Set Targetdir="C:\test"
  
  Echo %date% %time%: "Copying from %sourcedir% to %Targetdir%" &gt;&gt; %LOG%
  
  Forfiles /P "%Sourcedir%" /D +0 /C "cmd /c copy @path "%Targetdir%" &gt;&gt; %LOG%
  </code></pre>
  
  <p>when i execute the above script ,i am getting the below error                         ERROR: Invalid argument/option - '>>'.
  Type "FORFILES /?" for usage.   what could be the issue here ? thanks</p>