a (Add) command

7-Zip

a (Add) command

Adds files to archive.

Examples

7z a -tzip archive.zip subdir\

adds all files and subfolders from folder subdir to archive archive.zip.

7z a -t7z Files.7z *.txt -r

adds all *.txt files from current folder and its subfolders to archive Files.7z.

Switches that can be used with this command

-i (Include) -m (Method)
-p (Set Password)
-r (Recurse)
-sfx (create SFX)
-si (use StdIn)
-so (use StdOut)
-ssw (Compress shared files)
-t (Type of archive)
-u (Update)
-v (Volumes)
-w (Working Dir)
-x (Exclude)

See also

Commands: d (Delete), u (Update)
Switches: -u (Update)