![]()
[<<]Message[>>] [<<]Author[>>] [<<]Subject[>>] [<<]Thread[>>]
Number : 4410 Date : 2003-04-22 Author : Garry Deane Subject : Re: errorlevel Size(KB) : 0
--- In xxcopy@yahoogroups.com, "garrydeane" wrote: > You can either use the /ER switch to change the error codes to be > xcopy compatible (see XXTB #31) or also test for the errorlevel 100 > case (see XXTB #19). You might write your test like the following: > > if %errorlevel% NEQ 0 if %errorlevel% NEQ 100 ( > Echo Error occured for %%i >>archiveerr.log > ) else ( > Echo Copied successfully %%i >>archivesuccess.log > ) Oops, the code above is incorrect. It should be: if %errorlevel% EQU 0 ( Echo Copied successfully %%i >> archivesuccess.log ) else ( if %errorlevel% EQU 100 ( Echo No file found for %%i >> archiveerr.log ) else ( Echo Error occured for %%i >> archiveerr.log ) ) Garry
This message if part of XXCOPY's message Archive. The archive contains all the messages posted at Yahoo!Groups: XXCOPY.