-t (set Type of archive) switch

Specifies the type of archive.

Syntax

-t{archive_type}
{archive_type}
Specifies the type of archive. It can be: zip, 7z, rar, cab, gzip, bzip2, tar or other. 7z format is default.

Example

7z a -tzip archive.zip *.txt

adds all *.txt files from current directory to zip archive archive.zip.

Commands that can be used with this switch

a (Add), u (Update)