7zip is very powerful, you only need two files, 7z.exe and 7z.dll can use the command line to work.
After installing the 7zip software, locate the 7z.exe and 7z.dll two files under its installation directory, and copy them to C:\Windows\System32 for direct application in DOS.
Common way:
-O (Set Output directory) switch
Specifies a destination directory where files are to is extracted.
This switch can is used only with extraction commands.
Syntax-o{dir_path} {Dir_path} is the destination directory path. It ' s not required to end with a backslash. If you are specify * in {Dir_path}, 7-zip substitutes this * character to archive name.
Example 7z x Archive.zip-oc:\doc
Extracts all files from the Archive.zip archive to the C:\Doc directory.
7z x *.zip-o*
Extracts all *.zip archives to subfolders with names of these archives.
Usage:7za <command> [<switches> ...] <archive_name> [<file_names> ...]
[< @listfiles ...]
1. "A", adding files
7z a-t7z files.7z *.txt
2. "D", deleting files
7z d archive.zip *.bak-r
Remove all *.bak files from the zip file
3. "E", decompression
7z e Archive.zip
4. "L", listing documents
7z l Archive.zip
5. "T", test integrity
7z T Archive.zip *.doc-r
6. "U", update
7z u archive.zip *.d
7. "X", same as E, but keep full path
8. "M", specifying the optimization level
Compression Switch:-mx0
What it Means:don ' t compress at all.
is called "Copy mode."
Compression Switch:-MX1
What it means:very low compression.
It is called "fastest" mode.
Compression Switch:-mx3
What it means:fast compression mode.
Would set various parameters automatically.
Compression Switch:-MX5
What it means:same as above, but "normal."
Compression Switch:-mx7
What It means: "Maximum" compression.
Compression Switch:-mx9
What it means: "Ultra" compression.
(You probably want to use this.)
9. "-M" option:
Switch:-MFB
Function:specifies # of Fast bytes.
Sometimes help with very "sparse" files.
Don ' t bother.
Switch:-mpass
Function:number of passes for deflate compression.
Don ' t bother with this.
Automatically set with levels.
Switch:-MD
Function:specifies dictionary size.
Automatically set, so don ' t bother.
Switch:-MMT
Function:enable multithreading.
Use if:you have Quad-core and a really huge archive.
Specify ' on ' or ' off '.
This May is enabled by default; Check the Help file.
"-t" option
Specify a compressed file type
Type Switch:-t7z
format:7z
Example filename:archive.7z (default option)
Type Switch:-tgzip
Format:gzip
Example Filename:archive.gzip
Archive.gz
Type Switch:-tzip
Format:zip
Example Filename:archive.zip (very compatible)
Type Switch:-TBZIP2
Format:bzip2
Example FILENAME:ARCHIVE.BZIP2
Type Switch:-ttar
Format:tar
Example Filename:tarball.tar (UNIX and Linux)
Type Switch:-tiso
Format:iso
Example Filename:image.iso
Type Switch:-tudf
Format:udf
Example filename:disk.udf
7z A-tiso Archive.iso
7z a-tudf archive.udf
7z:executable Name
A:add to archive
-tiso Or-tudf:format of archive to create
Archive.iso or Archive.udf:name of archive to create
10. Hard compression
Switch:-ms=on
Function:enable solid mode.
This is the default so won ' t often need this.
Switch:-ms=off
Function:disable solid mode.
This is useful the need to update individual files.
Would reduce compression ratios normally.
Set the password "-P"
7z a pw.7z *.txt-psecret
12. Other options:
Switch:-SSC
Function:specify case-sensitive mode.
Useful for going between Linux and Windows.
Default:-ssc-on Windows (insensitive)
Default:-SCC on Linux (sensitive)
Switch:-SSW
function:compress locked files.
Use if:you have problems with opening files.
Switch: W
Function:set working directory.
Use while you are want to specify temp folders.
Switch:-aoa
Overwrite all destination files.
Switch:-aos
Skip over existing files without overwriting.
Use the to files where the earliest version is most important.
Switch:-aou
Avoid name collisions.
New files extracted'll have a number appending to their names.
(You'll have to deal with them later.)
Switch:-aot
Rename existing files.
This is not rename the new files and just the old ones already there.
Use while the new files are more important.
7z x Test.zip-aoa
7z:use the 7-zip executable
X:use the Extract command
Test.zip:extract files from this archive
-aoa:overwrite all existing files. risky!