1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
\r
4 <META http-equiv="Content-Type" content="text/html; charset=Windows-1252">
\r
5 <TITLE>a (Add) command</TITLE>
\r
6 <LINK href="style.css" rel="stylesheet" type="text/css">
\r
11 <H1>a (Add) command</H1>
\r
13 <P>Adds files to archive.</P>
\r
17 <PRE class="example">
\r
18 7z a archive1.zip subdir\
\r
21 <P>adds all files and subfolders from folder <SPAN class="filename">subdir</SPAN> to archive
\r
22 <SPAN class="filename">archive1.zip</SPAN>.
\r
23 The filenames in archive will contain <SPAN class="filename">subdir\</SPAN> prefix.</P>
\r
25 <PRE class="example">
\r
26 7z a archive2.zip .\subdir\*
\r
29 <P>adds all files and subfolders from folder <SPAN class="filename">subdir</SPAN> to archive
\r
30 <SPAN class="filename">archive2.zip</SPAN>.
\r
31 The filenames in archive will not contain <SPAN class="filename">subdir\</SPAN> prefix.</P>
\r
34 <PRE class="example">
\r
36 7z a c:\archive3.zip dir2\dir3\
\r
39 The filenames in archive <SPAN class="filename">c:\archive3.zip</SPAN>
\r
40 will contain <SPAN class="filename">dir2\dir3\</SPAN> prefix,
\r
41 but they will not contain <SPAN class="filename">c:\dir1\</SPAN> prefix.
\r
43 <PRE class="example">
\r
44 7z a Files.7z *.txt -r
\r
47 <P>adds all *.txt files from current folder and its subfolders to archive
\r
48 <SPAN class="filename">Files.7z</SPAN>.</P>
\r
53 <P>7-Zip doesn't uses the system wildcard parser. 7-Zip doesn't
\r
54 follow the archaic rule by which *.* means any file. 7-Zip treats
\r
55 *.* as matching the name of any file that has an extension. To process
\r
56 all files, you must use a * wildcard.</P>
\r
59 <H4>Switches that can be used with this command</H4>
\r
62 <A href="../switches/include.htm">-i (Include)</A><BR>
\r
63 <A href="../switches/method.htm">-m (Method)</A><BR>
\r
64 <A href="../switches/password.htm">-p (Set Password)</A><BR>
\r
65 <A href="../switches/recurse.htm">-r (Recurse)</A><BR>
\r
66 <A href="../switches/sfx.htm">-sfx (create SFX)</A><BR>
\r
67 <A href="../switches/stdin.htm">-si (use StdIn)</A><BR>
\r
68 <A href="../switches/stdout.htm">-so (use StdOut)</A><BR>
\r
69 <A href="../switches/shared.htm">-ssw (Compress shared files)</A><BR>
\r
70 <A href="../switches/type.htm">-t (Type of archive)</A><BR>
\r
71 <A href="../switches/update.htm">-u (Update)</A><BR>
\r
72 <A href="../switches/volume.htm">-v (Volumes)</A><BR>
\r
73 <A href="../switches/working_dir.htm">-w (Working Dir)</A><BR>
\r
74 <A href="../switches/exclude.htm">-x (Exclude)</A>
\r
81 <A href="delete.htm">d (Delete)</A>,
\r
82 <A href="update.htm">u (Update)</A><BR>
\r
84 <A href="../switches/update.htm">-u (Update)</A>
\r