compress

Syntax

compress[-z][-s][-ex][-cl 0-9][-o output_file][file...][-sfo]

compress[-u][-s][-ex][-p password][-od output_directory][-i input_file][-sfo]

Description

Compresses and decompresses files to and from zip files using MiniZip, reducing data transferred over the network. Compresses and decompresses files to and from zip files using MiniZip, reducing data transferred over the network.

Options

-z

Compresses the specified files into a zip file.

-u

Decompresses files from the input zip file.

-s

Displays information in silent mode, with no output messages.

-ex

Excludes the path from the file name when adding files to or extracting files from the zip file.

-cl 0-9

Selects a compression level: 0 compresses faster; 9 (default) compresses better.

-o output_file

Specifies an output file.

file...

Specifies one or more files to zip.

-p password

Specifies a password for the zip file.

-od output_directory

Specifies a directory where files from the zip file are to be extracted.

-i input_file

Specifies an input file.

-sfo

Displays information in standard formatted output.

Usage

This command is useful for reducing network load. It enables you to transfer multiple compressed files while still maintaining optimal performance. If an output_file name is not specified for the zip operation, the name of the first file/directory without the extension is used as the output zip file name. Password encryption for the zip operation is not supported. Decryption of a password protected zip file is supported. Existing files are overwritten for both the zip and unzip operations.

Examples

To execute a simple zip operation:

fs0:\> compress -z a.txt b.txt c.txt

To create a zip file and provide the name of the output zip file:

fs0:\> compress -z -o zipfile.zip a.txt b.txt c.txt

To create a zip file with faster compression logic:

fs0:\> compress -z -cl 0 -o zipfile.zip a.txt b.txt c.txt

To execute a simple unzip operation:

fs0:\> compress -u -i zipfile.zip

To unzip files to a specific directory:

fs0:\> compress -u -od newdir -i zipfile.zip

To unzip a password protected zip file to specific directory:

fs0:\> compress -u -p password -od newdir -i zipfile.zip

To unzip all files from a zip file to a root directory:

fs0:\> compress -u -ex -i zipfile.zip