11.1 Compressing Files: Compress

Compress (COMPRESS.EXE) creates compressed versions of one or more files. The resulting files are typically 25 to 45 percent smaller than the original files.

Command-line syntax for Compress is as follows:

compress [/?][/r] source destination

Following are command-line options and parameters for Compress:

/?

Displays information about how to use Compress.

/r

Specifies that compressed files should be renamed.

source

Specifies the source filename. The name can include a drive letter, a directory path, or both; and it can contain wildcards.

destination

Specifies the destination. This parameter can consist of a directory (with optional drive letter), a filename, or any combination of the two.

If the source parameter contains wildcards and the destination parameter does not specify only a directory, the /r option must be used.

If the destination parameter does not contain a filename, Compress uses the filename or filenames specified by the source parameter when Compress copies the file or files to the location specified by the destination parameter.