Use delimiters, spaces, and special characters in Command Prompt when interacting with WinZip

2 users found this article helpful

This article contains basic information to help with the use of the WinZip Command Line Support Add-on. It is intended for users who are not experienced with command line use. For specific help with the add-on, please see the information in WinZip Command Line Add-on Help located in the WinZip program group.

In most cases, a space in your command line is treated as a delimiter. A delimiter tells the command line interface that a boundary, or a break, has been reached. To demonstrate this, let's say that you wanted to run a file named example.zip from a command line and this file is one that you have saved in the WinZip folder. If your command prompt is presently in your user folder, as pictured below (the command prompt is in the Name folder in the picture), you would have to include the Path to example.zip in your command in order to run it.

Command Prompt window

However, since Program Files (or Program Files (x86) for 64-bit operating systems running a 32-bit version of WinZip) is in the path to the WinZip folder AND since there is a space in that name, if you enter the command in this way:

C:\Program Files\WinZip\example.zip

a message will display saying:

'C:\Program' is not recognized as an internal or external operable program or batch file.

This is because the space, acting as a delimiter, has told the command prompt that "C:\Program" is some sort of command, which is false. To correct this error, you would surround the entire command with double quotes like this:

"C:\Program Files\WinZip\example.zip"

Another instance where you would want to use double quotes would be if something on your command line, such as a filename, includes a DOS special character such as the ampersand (&). One place where you might encounter this special character situation is with the WinZip Command Line Support Add-On. It is quite possible that a password that you would have to type for an encrypted Zip file would include such a character.

A notable exception where a space does not act as a delimiter is the CD command. If you view the help text for the CD command, you will see that it states the exception in this way:

CHDIR... does not treat spaces as delimiters...

Additional information that can be helpful for you: Command Line Basics.

Was this article helpful?

Tell us how we can improve it.