WinZip Command Line Support Add-on return codes have not been developed to provide specific information. It is often the case that one return code can indicate more than one possible issue. For this reason, return codes are not documented and will not be distributed. Unless or until specific information is available, this policy will remain in effect.
WZZIP and WZUNZIP will usually return a nonzero errorlevel in the event of a serious error; otherwise, an errorlevel of 0 is returned. You can, then, use an IF (NOT) statement with a 0 return code in batch files and other automated processing.
Example: |
wzzip -ez -rP filename.zip @listfile.txt
IF ERRORLEVEL 0 GOTO NEXT
ECHO A zipping error occurred >error.txt
:NEXT |
In the example above, if no error occurs the batch file will continue to whatever commands follow :NEXT or it will end if no commands exist. However, if an error occurs an error.txt file will be created.
For troubleshooting, piping the display output of your command to a log file is often the best method to determine the point at which an error occurs and will often capture an error message. For additional details, please see the article
How to create a log file when using WinZip Command Line Support Add-on.
If you have any questions about this information please email Technical Support.