title: Create a log file from a copy batch file
body: <p>I have a COPY batch file that copies a file to multiple computers (about 300, which is being read from a separate text file), and I would like to see the results of the file copy.  If I can see both the successful and failed file copies, that would be great.  But it'll be fine if it's only possible to see the failed copies.  </p>
  
  <p>Here's the code that I have now, which is working great.  The files are being copied to the test computers I have setup.  Thank you all in advance for taking the time to help me out with this. </p>
  
  <pre><code>for /f "Tokens=*" %%a in (c:\computers.txt) do (set MyVar=%%a&amp; call :next)
  
  pause
  goto EOF
  
  :next
  echo %MyVar%
  
  if exist "\\%MyVar%\C$\Users\Public\Desktop" (
      Copy "C:\document search.website" "\\%MyVar%\c$\Users\Public\Desktop\" /Y 
      Copy "C:\document search.website" "\\%MyVar%\C$\Users\Public\Favorites\" /Y
  ) else ( copy "C:\document search.website" "\\%MyVar%\c$\Documents and Settings\All Users\Desktop\Document Search.url" /y
       copy "C:\document search.website" "\\%MyVar%\C$\Documents and Settings\All Users\Favorites\Document Search.url" /y 
  )
  </code></pre>