How to create a log file when using WinZip Command Line Support Add-on

2 users found this article helpful

All meaningful information that would normally display in the Command Prompt window (STDOUT) while you run your WinZip Command Line Support Add-On command can be easily redirected to a file for later review. You would only need to add a greater than sign (>) with a filename to the end of your command line. You may want to include a PATH for this file to ensure that it is written to a particular folder (e.g., C:\logfiles\output.log).

For example, the command:

wzzip -whs -ez -rP @listfile.txt >output.log

would produce a text file named output.log containing the information that would normally display in the Command Prompt window if the same command were run minus the redirect added to the end.

It is not necessary to redirect the error output (STDERR) as all warnings and other messages are part of the display output. The error output, if redirected, would consist of such things as the word "Searching" and many dots (...) used by the add-on similarly to having the cursor change to the hourglass icon in the user interface when an application is working on something.

If you are running your command line in some other type of script, such as you may need to redirect both STDOUT and STDERR. We have found an internal error may occur if only one of these is redirected in some scripts. Redirecting both or redirecting neither will avoid such an issue. As STDERR contains no useful information, it is recommended that you redirect it to a NULL or a separate file that can then be deleted.

Was this article helpful?

Tell us how we can improve it.