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>a (Add) command</TITLE> 6 <LINK href="style.css" rel="stylesheet" type="text/css"> 7</HEAD> 8 9<BODY> 10 11<H1>a (Add) command</H1> 12 13<P>Adds files to archive.</P> 14 15<H4>Examples</H4> 16 17<PRE class="example"> 187z a archive1.zip subdir\ 19</PRE> 20 21<P>adds all files and subfolders from folder <SPAN class="filename">subdir</SPAN> to archive 22 <SPAN class="filename">archive1.zip</SPAN>. 23 The filenames in archive will contain <SPAN class="filename">subdir\</SPAN> prefix.</P> 24 25<PRE class="example"> 267z a archive2.zip .\subdir\* 27</PRE> 28 29<P>adds all files and subfolders from folder <SPAN class="filename">subdir</SPAN> to archive 30 <SPAN class="filename">archive2.zip</SPAN>. 31 The filenames in archive will not contain <SPAN class="filename">subdir\</SPAN> prefix.</P> 32 33 34<PRE class="example"> 35cd /D c:\dir1\ 367z a c:\archive3.zip dir2\dir3\ 37</PRE> 38 39The filenames in archive <SPAN class="filename">c:\archive3.zip</SPAN> 40will contain <SPAN class="filename">dir2\dir3\</SPAN> prefix, 41but they will not contain <SPAN class="filename">c:\dir1\</SPAN> prefix. 42 43<PRE class="example"> 447z a Files.7z *.txt -r 45</PRE> 46 47<P>adds all *.txt files from current folder and its subfolders to archive 48 <SPAN class="filename">Files.7z</SPAN>.</P> 49 50 51<H4>Notes</H4> 52 53<P>7-Zip doesn't uses the system wildcard parser. 7-Zip doesn't 54follow the archaic rule by which *.* means any file. 7-Zip treats 55*.* as matching the name of any file that has an extension. To process 56all files, you must use a * wildcard.</P> 57 58 59<H4>Switches that can be used with this command</H4> 60 61<P> 62 <A href="../switches/include.htm">-i (Include)</A><BR> 63 <A href="../switches/method.htm">-m (Method)</A><BR> 64 <A href="../switches/password.htm">-p (Set Password)</A><BR> 65 <A href="../switches/recurse.htm">-r (Recurse)</A><BR> 66 <A href="../switches/sfx.htm">-sfx (create SFX)</A><BR> 67 <A href="../switches/stdin.htm">-si (use StdIn)</A><BR> 68 <A href="../switches/stdout.htm">-so (use StdOut)</A><BR> 69 <A href="../switches/shared.htm">-ssw (Compress shared files)</A><BR> 70 <A href="../switches/type.htm">-t (Type of archive)</A><BR> 71 <A href="../switches/update.htm">-u (Update)</A><BR> 72 <A href="../switches/volume.htm">-v (Volumes)</A><BR> 73 <A href="../switches/working_dir.htm">-w (Working Dir)</A><BR> 74 <A href="../switches/exclude.htm">-x (Exclude)</A> 75</P> 76 77<H4>See also</H4> 78 79<P> 80 <B>Commands:</B> 81 <A href="delete.htm">d (Delete)</A>, 82 <A href="update.htm">u (Update)</A><BR> 83 <B>Switches:</B> 84 <A href="../switches/update.htm">-u (Update)</A> 85</P> 86 87</BODY> 88</HTML> 89