7ZIP manual & documentation | ||||||||||
|
On this site: 7zC.txt 7zFormat.txt License.txt MANUAL/commands/add.htm MANUAL/commands/bench.htm MANUAL/commands/delete.htm MANUAL/commands/extract.htm MANUAL/commands/extract_full.htm MANUAL/commands/index.htm MANUAL/commands/list.htm MANUAL/commands/style.css MANUAL/commands/test.htm MANUAL/commands/update.htm MANUAL/exit_codes.htm MANUAL/index.htm MANUAL/style.css MANUAL/switches/ar_exclude.htm MANUAL/switches/ar_include.htm MANUAL/switches/ar_no.htm MANUAL/switches/charset.htm MANUAL/switches/exclude.htm MANUAL/switches/include.htm MANUAL/switches/index.htm MANUAL/switches/list_tech.htm MANUAL/switches/method.htm MANUAL/switches/output_dir.htm MANUAL/switches/overwrite.htm MANUAL/switches/password.htm MANUAL/switches/recurse.htm MANUAL/switches/sfx.htm MANUAL/switches/ssc.htm MANUAL/switches/stdin.htm MANUAL/switches/stdout.htm MANUAL/switches/stop_switch.htm MANUAL/switches/style.css MANUAL/switches/type.htm MANUAL/switches/update.htm MANUAL/switches/volume.htm MANUAL/switches/working_dir.htm MANUAL/switches/yes.htm MANUAL/syntax.htm Methods.txt copying.txt history.txt lzma.txt readme.txt unRarLicense.txt |
Command Line Syntax7z <command> [<switch>...] <base_archive_name> [<arguments>...] <arguments> ::= <switch> | <wildcard> | <filename> | <list_file> <switch>::= <switch_symbol><switch_characters>[<option>] <switch_symbol> ::= '/' | '-' <list_file> ::= @{filename} Expressions in square brackets (between '[' and ']') are optional. Expressions in curly braces ('{' and '}') mean that instead of that Expression (including braces), the user must substitute some string. 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:
7-Zip doesn't uses the system wildcard parser. 7-Zip doesn't follow the archaic rule by which *.* means any file. 7-Zip treats *.* as matching the name of any file that has an extension. To process all files, you must use a * wildcard. Examples:
The default wildcard "*" will be used if there is no filename/wildcard in the command line. Slash ('\') at the end of a path means a directory. Without a Slash ('\') at the end of the path, the path can refer either to a file or a directory. List fileYou 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 new line symbol(s). For list files, 7-Zip uses UTF-8 encoding by default. You can change encoding using -scs switch. Multiple list files are supported. For example, if the file "listfile.txt" contains the following:
My programs\*.cpp
Src\*.cpp
then the command
7z a -tzip archive.zip @listfile.txt
adds to the archive "archive.zip" all "*.cpp" files from directories "My programs" and "Src". Short and Long File Names7-Zip supports short file names (like FILENA~1.TXT) in some cases. However, it's strongly recommended to use only the real (long) file names. | |||||||||
| Hosted by bugaco.com |