1.

Solve : xcopy error report to txt file help.?

Answer»

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
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



Discussion

No Comment Found