[<<]Message[>>]    [<<]Author[>>]    [<<]Subject[>>]    [<<]Thread[>>]

Number : 4333 Date : 2003-04-17 Author : Garry Deane Subject : Re: copy failed. Size(KB) : 0
--- In xxcopy@yahoogroups.com, anders thoresson wrote: > /oA Appends to a logfile, reporting errors. > (does not overwrite log). > /oN Outputs a new logfile, reporting errors > (make a new log file). > > But those switches writes to the logfile on every execution. > Is there a way to log just failed copys? No, but you can write the log to a temporary file then check the errorlevel after xxcopy completes. If there's no error (errorlevel 0 or 100), simply delete the temporary log file. If there is an error, append it's contents to your permanent log file before deleting it. On NT/W2k/XP you can do this in a batch file: xxcopy /params/on%temp%\xxcopy.tmp if %errorlevel% EQU 0 goto :eof if %errorlevel% EQU 100 goto :eof type %temp%\xxcopy.tmp >> c:\xxcopy\xxcopy.log del %temp%\xxcopy.tmp Garry
This message if part of XXCOPY's message Archive. The archive contains all the messages posted at Yahoo!Groups: XXCOPY.