source: other-projects/expeditee-release-kits/shared/linux/p7z-essentials/DOCS/MANUAL/syntax.htm@ 28714

Last change on this file since 28714 was 28714, checked in by ak19, 10 years ago

jts21 - Customising the shared/linux folder for expeditee, meaning that now it's no longer an svn:external from greenstone. Add self extracting 32/64 bit Java 8 JREs, and files + instructions for creating them.

File size: 3.9 KB
Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
2<HTML>
3<HEAD>
4 <META http-equiv="Content-Type" content="text/html; charset=Windows-1252">
5 <TITLE>Command Line Syntax</TITLE>
6 <LINK href="style.css" rel="stylesheet" type="text/css">
7</HEAD>
8
9<BODY>
10
11<H1>Command Line Syntax</H1>
12
13<PRE class = "syntax">
147z <A href = "commands/index.htm">&lt;command></A> [<A href = "switches/index.htm">&lt;switch></A>...] &lt;base_archive_name> [&lt;arguments>...]
15</PRE>
16<PRE class = "syntax">
17&lt;arguments> ::= <A href = "switches/index.htm">&lt;switch></A> | &lt;wildcard> | &lt;filename> | &lt;list_file>
18<A href = "switches/index.htm">&lt;switch></A>::= &lt;switch_symbol>&lt;switch_characters>[&lt;option>]
19&lt;switch_symbol> ::= '/' | '-'
20&lt;list_file> ::= @{filename}
21</PRE>
22
23
24<P>Expressions in square brackets (between '[' and ']') are optional.</P>
25
26<P>Expressions in curly braces ('{' and '}') mean that instead of that
27Expression (including braces), the user must substitute some string.</P>
28
29<P>Expression</P>
30
31<PRE class = "syntax">
32expression1 | expression2 | ... | expressionN</DT>
33</PRE>
34
35<P>
36means that any (but only one) from these expressions must be specified.
37
38<P><A href = "commands/index.htm">Commands</A> and
39<A href = "switches/index.htm">switches</A> can be entered in upper or lower case.</P>
40
41<P>Command is the first non-switch argument.</P>
42
43<P>The "base_archive_name" must be the first filename on the command line
44after the command.</P>
45
46<P>The switches and other filenames can be in any order.</P>
47
48<P>Wildcards or filenames with spaces must be quoted:</P>
49
50<PRE>
51 "Dir\Program files\*"
52 Dir\"Program files"\*
53</PRE>
54
55<P>Switch options can be combined to save command line length. However, some
56switch options take optional string arguments and therefore, must be the
57last option in a combined argument token string because 7-Zip accepts the
58rest of the argument token as the optional argument.</P>
59
60<P>7-Zip uses wild name matching similar to Windows 95:</P>
61<UL>
62 <LI><B>'*'</B> means a sequence of arbitrary characters.</LI>
63 <LI><B>'?'</B> means any character.</LI>
64</UL>
65
66<P><B>
677-Zip doesn't uses the system wildcard parser. 7-Zip doesn't
68follow the archaic rule by which *.* means any file. 7-Zip treats
69*.* as matching the name of any file that has an extension. To process all files, you must
70use a * wildcard.</B></P>
71
72<P>Examples:</P>
73<TABLE border = "0">
74 <TR><TD>*.txt</TD><TD>means all files with an extension of ".txt"</TD></TR>
75 <TR><TD>?a*</TD><TD>means all files with a second character of "a"</TD></TR>
76 <TR><TD>*1*</TD><TD>means all names that contains character "1"</TD></TR>
77 <TR><TD>*.*.*</TD><TD>means all names that contain two at least "." characters</TD></TR>
78</TABLE>
79
80
81<P>The default wildcard "*" will be used if there is no filename/wildcard in the
82command line.</P>
83
84<P>Slash ('\') at the end of a path means a directory. Without a Slash ('\') at
85the end of the path, the path can refer either to a file or a directory.
86
87
88<H2><A name = "ListFile"></A>List file</H2>
89
90<P>You can supply one or more filenames or wildcards for special list files
91(files containing lists of files). The filenames in such list file must be
92separated by new line symbol(s).</P>
93
94<P>For list files, 7-Zip uses UTF-8 encoding by default. You can change encoding
95using <A href = "switches/charset.htm">-scs</A> switch.</P>
96
97<P>Multiple list files are supported.</P>
98
99<P>For example, if the file "listfile.txt" contains the following:</P>
100
101<PRE>
102 My programs\*.cpp
103 Src\*.cpp
104</PRE>
105<P>then the command</P>
106
107<PRE>
108 7z a -tzip archive.zip @listfile.txt
109</PRE>
110
111<P>adds to the archive "archive.zip" all "*.cpp" files from directories "My
112programs" and "Src".</P>
113
114<H2><A name = "ListFile"></A>Short and Long File Names</H2>
115
116<P>7-Zip supports short file names (like FILENA~1.TXT) in some cases.
117However, it's strongly recommended to use only the real (long) file names.</P>
118
119</BODY>
120</HTML>
Note: See TracBrowser for help on using the repository browser.