7za.exe:http://www.7-zip.org/a/7za920.zip
7za <command> [<switch> ...] <base_archive_name> [<arguments> ...]
<command>
A add
U update
<switch>
1. Path or file names with spaces must be enclosed in quotation marks, wildcard (wildcards) are limited to file names, and wildcards and characters cannot be used in a path.
Examples of errors: C:\dir1\*.cpp and Dir1\d?r2\file1.txt
2. "*" represents all documents, while "* *" stands for all "." The file.
-i[r[-|0]]{@listfile |! Wildcard}: Include filenames include file
-x[r[-|0]]]{@listfile |! Wildcard}: EXclude filenames exclude files
-R[-|0]: Recurse subdirectories recursive subdirectory mode:-R is on-r-for off-r0 is on but only wildcard characters are enabled.
7za a-tzip src.zip *.txt-ir! Dir1\*.cpp
Add the *.txt file from the current directory, and the *.cpp file in the DIR1 directory and its subdirectories to the Src.zip compressed package.
7za a-tzip archive.zip-r src\*.cpp src\*.h
Add the *.cpp and *.h files in the SRC directory and its subdirectories to the Archive.zip compressed package.
"Listfile.txt" contains the following content:
"My Programs\*.cpp"
Src\*.cpp
7za a-tzip archive.zip @listfile. txt
Add all files with the "CPP" extension in the "My programs" and "SRC" directories to the compressed archive "Archive.zip"
-t{type}: Set Type of archive Specifies the format of the compressed package (zip, 7z, RAR, Cab, gzip, bzip2, TAR)
-V{SIZE}[B|K|M|G]: Create Volumes Specify the sub-volume size
-p{password}: Set Password specify password
-w[{path}]: Assign work directory. Empty path means a temporary directory temporary working directory
-ssw:compress shared files compresses a file that is being used by another application. Such a file is not compressed by default.
-u[-][p#][q#][r#][x#][y#][z#][!newarchivename]: Update options
7za u c:\1\exist.7z-u--up0q3x2z0!c:\1\update.7z *-R
(incremental backup) does not change the contents of the exist.7z compressed package, creates a new compressed package update.7z and writes all the different files in the exist.7z compressed package in the current directory to this compressed package.
Status description files in the file compression package on the disk
The P file is in a compressed package, but does not match the file on disk. exists, but does not match
The Q file is in a compressed package but does not exist on the disk. There is no existence
The R file is not in a compressed package, but it exists on disk. Existence does not exist
The files in the X-compressed package are newer than the files on the disk. Older than newer
Y the files in the compressed package are older than the files on the disk. Newer older
Z The files in the package are the same as the files on the disk. Same as same
W cannot detect if the file is newer (same time but different size)??
0 Ignore file (do not create project for this file in compressed package)
1 Copying files (overwriting old files with new files in the package)
2 compressing files (compressing new files on the disk into the archive)
Packaging files with 7za.exe