home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1999 October
/
PCWorld_1999-10_cd1.bin
/
Software
/
Servis
/
7-zip
/
7zipDoc.txt
< prev
next >
Wrap
Text File
|
1999-07-18
|
23KB
|
883 lines
User's Manual
7-ZIP Archiver
Version 2.00
Contents
--------
Contents
Introduction
Compression ratio results
Zip format compatibility
Command line syntax
Commands
Switches
FAR support
Registration
Final comments
Introduction
------------
7-ZIP Archiver is a shareware program for manipulating with ZIP file
archives. 7-ZIP is a console 32-bit executable for Windows 95, 98 and NT.
Compression ratio results
-------------------------
Compression ratio results are very dependent upon the data used for
the tests. We compared 7-ZIP with some of the leading zip-compatible
commercial archivers: PKZIP 2.04g, WinZip 7.0.
FILE SET: The Canterbury Corpus (11 files totaling 2,810,784 bytes,
popular file set used to compression rates).
Archiver Compressed size Ratio
7-ZIP -mx 676284 100%
PKZIP 2.04g -ex 726047 107%
WinZip 7.0 (Max Compression) 731499 108%
ZIP format compatibility
------------------------
7-ZIP Archiver creates fully ZIP compatible archives. It means that
everyone can decompress these files by any ZIP compatible decompression
utility. During compression 7-ZIP can use one of the following ZIP
compression methods:
* 0 - Store
* 8 - Deflate
Current version of the 7-ZIP can extract any files from ZIP archive that
were compressed with one of the following methods:
* 0 - Store
* 6 - Implode
* 8 - Deflate
Files compressed with other ZIP compression methods can't be extracted by
current version of the 7-ZIP. But supported methods are the most popular
now and it causes 7-ZIP can decompress the most of ZIP archives. For
extracting files compressed with non-supported methods you must use some
other ZIP utility.
Since all ZIP compression methods supported by 7-ZIP compression engine
also are supported by 7-ZIP decompression engine then any ZIP archive
created by 7-ZIP can further be decompressed by 7-ZIP.
Current version of the 7-ZIP also doesn't support multivolume archives, the
most of the SFX archives and encrypted files.
Command line syntax:
--------------------
7ZIP <command> [<switch>...] <base_archive_name>[.zip]
[<arguments>...]
<arguments> ::= <switch> | <wildcard> | <filename> | <list_file>
<switch>::= {'/'|'-'}<switch_characters>[<option>]
<list_file> ::= '@'<filename>
Expressions in square brackets (between '[' and ']') are optional.
Expressions in curly braces (between '{' and '}') are required.
Expression
expression1 | expression2 | ... | expressionN
means that any (but only one) from these expressions must be specified.
Commands and switches can be entered in upper or lower case.
Command is the first non-switch argument.
The "base_archive_name" must be the first filename on the command line
after the command.
The switches and other filenames can be in any order.
Wildcards or filenames with spaces must be quoted:
"Dir\Program files\*"
Dir\"Program files"\*
Switch options can be combined to save command line length. However, some
switch options take optional string arguments and therefore, must be the
last option in a combined argument token string because 7-ZIP accepts the
rest of the argument token as the optional argument.
7-ZIP uses wild name matching similar to Windows 95:
* '*' means a sequence of arbitrary characters.
* '?' means any character.
Examples:
"*.txt" means all files with an extension of
".txt"
"?a*" means all files with a second
character of "a"
"*1*" means all names that contains
character "1"
"*.*.*" means all names that contain two "."
characters
The default wildcard "*" will be used if there is no filename/wildcard in
command line.
Restrictions for wildcards and filenames for archiving files:
* Wildcards and filenames can't contain disk name or network name. Every
wildcard/filename path is treated as path from current directory on
disk and as path from root directory in archive. In other words, the
first part of path (letters before first slash ('\') symbol) always
must be name or wildcard.
* Wildcards and filenames can't be ended by slash ('\') symbol
* Wildcards can contain wildcard characters ('*' and '?') only in last
part of path.
Examples:
Dir1\*.cpp OK
c:\Dir1\*.cpp ILLEGAL: path contains disk name
Dir1\Dir2\g?.txt OK
Dir1\D?r2\file1.txt ILLEGAL: there is a wildcard char in
non last part
These restrictions do not act to filenames and directory names used not as
archiving files.
List file
---------
You can supply one or more filenames or wildcards for special list files
(files containing lists of files). The filenames in such list file must be
separated by space, tab or new line symbol(s). Wildcards or filenames with
spaces must be quoted.
Multiple list files are supported.
For example, if contents of file "listfile.txt" is the following:
"My programs\*.cpp"
Src\*.cpp
then command
7ZIP a archive @listfile.txt
adds to archive "archive.zip" all "*.cpp" files from directories "My
programs" and "Src"
Commands:
---------
ID Description Related Switches
a Add -i, -m, -mx, -r, -u, -w,
-x
d Delete -i, -m, -mx, -r, -u, -w,
-x
e Extarct -i, -o, -r, -x, -y
l List -i, -r, -x
t Test -i, -r, -x
u Update -i, -m, -mx, -r, -u, -w,
-x
x Extract -i, -o, -r, -x, -y
with full
paths
a: Add files to archive
-----------------------
This command allows to add files to archive.
Examples:
7ZIP a archive subdir\*
archives all files in directory "subdir".
7ZIP a archive "Program files\*" -r
archives all files in directory "Program files" and subdirectories.
See also: d, u, -u
Related switches: -i, -m, -mx, -r, -u, -w, -x
d: Delete files from archive
----------------------------
This command allows you to delete files from the archive. These deleted
files are physically removed from the archive.
Example:
7ZIP d archive *.bak
See also: a, u, -u
Related switches: -i, -m, -mx, -r, -u, -w, -x
e: Extract files from archive
-----------------------------
This command will extract one or more files from the archive to the current
directory or to the output directory if specified. 7-ZIP will prompt the
user before overwriting existing files unless the user specifies the "-y"
switch. If the user gives a "no" answer, 7-ZIP will prompt must file be
extracted to other filename. Then a "no" answer skips file and "yes"
prompts for new filename.
7-ZIP accepts the following responses:
* "Yes"
* "No"
* "Always" sets 7-ZIP to assume YES for ALL subsequent queries of the
same class
* "Skip" sets 7-ZIP to assume NO for ALL subsequent queries of the same
class
* "Quit"
Abbreviated responses such as "y", "n", "a", "s" and "q" are allowed.
Example:
7ZIP e archive -oc:\soft *.cpp
extracts all files ending in ".cpp" to subdirectory "c:\soft".
See also: x
Related switches: -i, -o, -r, -x, -y
l: List contents of archive
---------------------------
Format:
l [a | t] [f]
List contents of archive.
a List with Additional fields
t List with all fields,
including technical
f List with pathnames
Example:
7ZIP lf archive *.txt
lists all "txt" files with full pathnames.
Related switches: -i, -r, -x
t: Test integrity of archive
----------------------------
Test archive files. This command performs a dummy file extraction, writing
nothing to the output stream, in order to validate the specified file(s).
7-ZIP uses a 32 bit CRC to validate the contents of the files.
Example:
7ZIP t archive *.doc
tests all files ending in ".doc".
Related switches: -i, -r, -x
u: Update files to archive
--------------------------
Update older files in the archive and add files that are new to the
archive.
Example:
7ZIP u archive *.doc
See also: a, d, -u
Related switches: -i, -m, -mx, -r, -u, -w, -x
x: eXtract files with full pathname
-----------------------------------
This command extracts one or more files from the archive to their full
paths in the current directory or to the output directory if specified.
Example:
7ZIP x archive -oc:\soft -r *.cpp
extracts all files ending in ".cpp" from all archive subdirectories to
directory "c:\soft".
See also: e
Related switches: -i, -o, -r, -x, -y
Switches:
---------
ID Description Related
commands
-i Include filenames a, d, e, l, t,
u, x
-m Set Method a, d, u
-mx MaXimize compression a, d, u
-o Set Output directory e, x
-r Recurse subdirectories a, d, e, l, t,
u, x
-register Register 7-ZIP
-u Update options a, d, u
-w Assign Work directory a, d, u
-x Exclude filenames a, d, e, l, t,
u, x
-y Assume Yes on all e, x
queries
-i: Include filenames
---------------------
Format:
-i [r [- | 0] ] {@ listfile | ! wildcard}
This switch specifies additional include filenames and wildcards.
r [- | 0] Specifies how wildcards and file
names specified in this switch must
be used. If this option is not
assigned then global value, assigned
by -r switch will be used. For more
details see specification of -r
switch
@listfile Specifies name of list file. See List
file description
!wildcard Specifies wildcard or filename
Multiple include switches are supported.
Example:
7ZIP a src *.txt -ir!DIR1\*.cpp
adds all "*.txt" files from current directory and all "*.cpp" files from
directory "DIR1" and from all it's subdirectories.
See also: -r, -x
Related commands: a, d, e, l, t, u, x
-m: set compression Method
--------------------------
Format:
-m <method_id>
<method_id> ::= 0 | 8
This switch specifies archiving method.
-m0 "Store" method. Files will be copied to archive
without compression. Archiving with "-m0" is
faster then with "-m8"
-m8 "Normal" method. Files will be compressed. This
option is set by default
Examples:
7ZIP a archive *.jpg -m0
adds all "*.jpg" files to archive without compression.
7ZIP a arch *.exe *.dll -m8
adds all "*.exe" and "*.dll" files to archive using normal compression
method.
Related commands: a, d, u
-mx: maXimize compression
--------------------------
Format:
-mx
This switch sets the best compression method. It requires additional
10 MB of RAM and works about twice slower.
Related commands: a, d, u
-o: set Output directory
-----------------------
Format:
-o dir_path
This switch specifies destination directory where files are to be
extracted.
dir_path Specifies the destination
directory path. It's not required
path end with a backslash.
This switch works only with extraction commands.
Example:
7ZIP e archive dir1\a.doc -oc:\Docs
extracts file "dir1\a.doc" from archive to "c:\Docs\a.doc"
Related commands: e, x
-r: Recurse subdirectories
--------------------------
Format:
-r [- | 0]
This switch specifies method of treating wildcards and filenames assigned
in command line.
-r Enable recurse subdirectories. This
option is default for all commands
that matches files only within
archive: e, l, t, x
-r- Disable recurse subdirectories.
This option is default for all
commands that can scan files on
disk: a, d, u
-r0 Enable recurse subdirectories only
for wildcard names.
Examples:
7ZIP l archive -r- *.doc
lists all "*.doc" files in archive that belong root archive directory.
7ZIP a archive -r src\*.cpp src\*.h
adds all "*.cpp" and "*.h" files from directory "src" and all it's
subdirectories.
See also: -i, -x
Related commands: a, d, e, l, t, u, x
-register: Register copy of 7-ZIP
---------------------------------
Format:
-register [keyFileName]
This switch allows you register your copy of 7-ZIP.
At first you must get registration key (see Registration).
There are two ways to register application:
1. Copy registration key to clipboard and run:
7zip -register
2. Save registration key to text file and run:
7zip -register FileName
where FileName is a name of text file containing registration key.
-u: Update options
------------------
Format:
-u [-] <actions> [! new_archive_name]
<action_set> ::= <state_action>...
<state_action> ::= <state_type> <action_type>
<state_type> ::= p | q | r | x | y | z
<action_type> ::= 0 | 1 | 2
This switch specifies how update files in archive and (or) create new
archives.
- Disable any updates in base
archive.
! new_archive_name Specifies path of the new
archive, which must be created.
All other options in this
switch will refer to this new
archive.
If not assigned, then all other
options in this switch will
refer to base archive of
command
Term "base archive" means archive assigned by "base_archive_name" string in
command line. See Command line syntax
Description of <state_type>:
For each unique filename there are 6 variants of state:
<state_type> State condition Disk Archive
p File exists in Exists,
archive, but but isn't
isn't wildcarded wildcarded
by archive
command.
q File exists in Not Exists
archive but exists
doesn't exist on
disk.
r File doesn't Exists Not exists
exist in archive
but exists on
disk.
x File in archive Older Newer
is newer than
file with same
name on disk.
y File in archive Newer Older
is older than
file with same
name on disk.
z File in archive Same Same
is same as file
with same name on
disk.
Description of <action_type>:
For each of the <state_type> you can specify action what do you wish:
<action_type> Description
0 Ignore file (don't create item in new
archive for this file)
1 Copy file (copy from old archive to
new)
2 Compress (compress file from disk to
new archive)
Any update command (a, d, u) can be assigned in these terms:
p q r x y z
Disk any Not Exists Older Newer Same
exists
Exists,
Archive not Exists Newer Older Same
wildcarded
a Copy
d Copy Copy Com Com Com Com
u Copy Copy Com Copy Com Copy
"Empty" cell means 0 (Ignore).
"Copy" cell means 1 (Copy from base archive).
"Com" cell means 2 (Compress from disk).
If you don't specify "!newArchiveName", then all options will refer to main
archive (archive assigned in command line after command).
If you specify "!newArchiveName", then 7-ZIP also will create a new archive
with specified name. 7-ZIP can create any number of new archive during one
operation.
By default for each new archive <action_set> is set as action set of main
command (there are 3 different action sets for commands: a, d, u). You can
overload any. <state_action>
Example:
7ZIP u exist_archive.zip -u- -usp0q0x2z0!update.zip *.cpp
creates new archive "update.zip" and writes to this archive all "*.cpp"
files from current directory that differs from files in archive
"exist_archive.zip". Archive "exist_archive" will not be changed.
Related commands: a, d, u
-w: assign Work directory
------------------------
Format:
-w [<path>]
This switch specifies working directory for temporary base archive. By
default, 7-ZIP builds a new base archive file in the same directory as the
old base archive file. By specifying the "-w" switch, you can specify the
working directory where the temporary base archive file will be built.
After the temporary base archive file is built, it is copied over the
original archive and deleted. If <path> is not assigned, then 7-ZIP will
use Windows temporary directory.
Example:
7ZIP a archive *.cpp -wc:\temp
Related commands: a, d, u
-x: Exclude filenames
--------------------
Format:
-x [r [- | 0] ] {@ listfile | ! wildcard}
This switch specifies what filenames or (and) wildcards must be excluded
from operation.
For full option description of this switch see -i Include switch
description.
-i[r[-|0]]@listfile|!wildcard
Multiple exclude switches are supported.
Example:
7ZIP a src *.txt -x!temp.*
adds all "*.txt", except files with "temp" name, to archive "src.zip".
See also: -i, -r
Related commands: a, d, e, l, t, u, x
-y: assume Yes on all queries
----------------------------
Format:
-y
This switch disables most of the normal user queries during 7-ZIP
execution. You can use this switch to suppress overwrite queries in the "e"
and "x" commands.
Example:
7ZIP x src -y
extracts all files from archive "src.zip". All overwrite queries will be
suppressed and files on disk with same filenames as in archive will be
overwritten.
Related commands: e, x
FAR support
-----------
The "FAR Manager" is a very good file manager. It facilitates a large
number of operations with files, folders and archives under Windows 95 and
Windows NT operating systems. It works in text mode. You can download "FAR
Manager" from sites:
http://www.rarsoft.com
If you want tune "FAR Manager" for 7-ZIP supporting you must
* Install "FAR Manager"
* Register file "far7zip.reg" (this file is included to 7-ZIP
distributive packet) in registry. It make FAR use 7-ZIP program only
for "Adding to archive" operation.
Since current version of the 7-ZIP can't work with some of the ZIP archives
created by other ZIP utilities (see Zip format compatibility part of this
document) then you can use some other ZIP utility for all operations except
"Adding".
If you already have other ZIP utility used by FAR, then you can
register only file "far7zip.reg" and do not register "far7zip2.reg". If you
have no other ZIP utility, then you should register file "far7zip2.reg".
By registering file "far7zip2.reg" you make FAR use 7-ZIP program for the
following operations:
* Adding files to archive
* Extracting files from archive
* Testing files in archive
* Deleting files from archive
Note: current version of the 7-ZIP doesn't support "Move files to archive"
operation.
If you want refuse 7-ZIP supporting in "FAR Manager" after registration of
file "far7zip.reg" or "far7zip2.reg" then just remove lines that contain
7-ZIP program name from registry folder:
[HKEY_LOCAL_MACHINE\SOFTWARE\Far\Plugins\MultiArc\ZIP]
Registration
------------
You can register your copy of 7-ZIP at a cost of $35 through
the World Wide Web. This is the fastest and easiest way. The
ordering page is on a secure server, ensuring that your
confidential information remains confidential.
For details on ordering 7-ZIP through the Web, please go to the
Order 7-ZIP page at:
http://compression.hypermart.net/order.html
On payment approval (usually, in one-two business days), we'll
send you the registration key which will remove all limitations
of unregistered version. Your registration will be valid for all
future versions of 7-ZIP.
If you will not get your registration key within a reasonable
amount of time (three business days for credit card payments),
please notify us about that!
We're very sorry for any inconvenience caused by those delays.
Important: when filling the order form, please double-check that
your e-mail address is correct. If it will not, we'll be unable
to send you the registration key.
Final comments:
---------------
If you will disclose any bugs in program, please, send some report
to the author.
The official page of the 7-ZIP can be accessed at:
http://compress.da.ru
You may freely send your comments and suggestions to Igor Pavlov, the
author of the 7-ZIP:
E-mail: ipavlov@mail.ru
WWW:
http://compress.da.ru
http://compression.hypermart.net
Igor Pavlov
End of document