Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: xcopy error report to txt file help.  (Read 8209 times)

0 Members and 1 Guest are viewing this topic.

almulder

    Topic Starter


    Greenhorn

    • Experience: Beginner
    • OS: Unknown
    xcopy error report to txt file help.
    « on: November 01, 2011, 12:32:18 PM »
    I am copying large amounts of files to different servers using the following command

    Code: [Select]
    XCOPY  *.* "\\192.168.1.99\C$\Test Folder" /EXCLUDE:copyfiles.cfg /s/y/z/v/k

    How can I output individual file errors to a LOG.TXT file?

    Currently I have this, but i need more detailed info of what was not copied. not just that an error occurred withing the 100+ files copied. I want to know what files were not copied.
    Code: [Select]
    if errorlevel 4 echo "An error has be found" && echo. Please check the log.txt file. && echo %date% %time% Insufficient disk access, space, on Serve 1>> .\LOG.TXT
    if errorlevel 5 echo echo %date% %time% Disk write error occurred on Server 1>> .\LOG.TXT

    gpl



      Apprentice
    • Thanked: 27
      Re: xcopy error report to txt file help.
      « Reply #1 on: November 01, 2011, 01:42:29 PM »
      I havent used xcopy much, but if it outputs errors to the screen, you can capture them with

      Code: [Select]
      XCOPY  *.* "\\192.168.1.99\C$\Test Folder" /EXCLUDE:copyfiles.cfg /s/y/z/v/k > LOG.TXT 2>&1which copies both 'normal' and error messages