COMPRESS (2003 Resource Kit)

Compress one or more files.

Syntax
      COMPRESS [-R] [-D] [-S] [ -Z | -ZX ] Source Destination

      COMPRESS -R [-D] [-S] [ -Z | -ZX ] Source [Destination]

Key
   -R   Rename compressed files.

   -D   Update compressed files only if out of date.

   -S   Suppress copyright information.

   -ZX  LZX compression. This is default compression.  

   -Z   MS-ZIP compression.

 Source Source file specification. Wildcards may be used.

Destination
        Destination file | path specification.
        Destination may be a directory.   

If Source is multiple files and -r is not specified, Destination must be a directory.

Examples:

COMPRESS demo.txt compressed.txt

COMPRESS -R *.*

COMPRESS -R *.exe *.dll compressed_dir

“In art, truth and reality begin when one no longer understands what one is doing or what one knows, and when there remains an energy that is all the stronger for being constrained, controlled and compressed” ~ Henri Matisse

Related:

Zip a file - using only built-in Batch/VBS commands (Superuser.com)
COMPACT - Compress files or folders on an NTFS partition.
MAKECAB - Create .CAB files.


© Copyright SS64.com 1999-2014
Some rights reserved