Search:     Advanced search

Delimiters, spaces, and special characters

Article ID: 287
Last updated: 22 Sep, 2017
Views: 23706

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 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 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\

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\"

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...

See also: Command Line Basics articles

This article was:   Helpful | Not Helpful
Attached files
file KB287.pdf (14 kb)

Prev   Next
What are the Return Codes for WinZip Command Line Support Add-on?     The requirements for WinZip Command Line Support Add-on to run...