7-Zip CommondLine 使用记录
下载:http://www.7-zip.org/zh-cn/download.html
这是一个使用命令压缩和解压文件的7-zip,从官方网站下载它的zip包,因为windowsXP/2003可以直接将zip视为特殊的文件夹,所以不用安装winzip就可以打开,然后将里面的7za.exe文件拷贝到C:/windows/ 目录下。这样你就可以通过命令行在任一目录下调用7-zip程序,解压压缩文件,就像在linux上使用tar。
在命令行中输入7za,就会显示7za的帮助:
7-Zip (A) 4.42 Copyright (c) 1999-2006 Igor Pavlov 2006-05-14
Usage: 7za [...] [...]
[<@listfiles...>]
a: Add files to archive
d: Delete files from archive
e: Extract files from archive (without using directory names)
l: List contents of archive
t: Test integrity of archive
u: Update files to archive
x: eXtract files with full paths
-ai[r[-|0]]{@listfile|!wildcard}: Include archives
-ax[r[-|0]]{@listfile|!wildcard}: eXclude archives
-bd: Disable percentage indicator
-i[r[-|0]]{@listfile|!wildcard}: Include filenames
-m{Parameters}: set compression Method
-o{Directory}: set Output directory
-p{Password}: set Password
-r[-|0]: Recurse subdirectories
-scs{UTF-8 | WIN | DOS}: set charset for list files
-sfx[{name}]: Create SFX archive
-si[{name}]: read data from stdin
-slt: show technical information for l (List) command
-so: write data to stdout
-t{Type}: Set type of archive
-v{Size}[b|k|m|g]: Create volumes
-u[-][p#][q#][r#][x#][y#][z#][!newArchiveName]: Update options
-w[{path}]: assign Work directory. Empty path means a temporary directory
-x[r[-|0]]]{@listfile|!wildcard}: eXclude filenames
-y: assume Yes on all queries
所以,简单的,可以使用:
A 将同目录下的zip.zip文件解压到tmp文件夹中.
7za e -o tmp temp.zip
B.将tmp添加到temp.7z压缩包中.
7za a temp.7z tmp
C.将当前目录的所有文件添加到temp.7z压缩包中.
7z a -sfx temp.7z
D.自释放程序制作
7z a -sfx temp.exe *.txt
(*)需要自释放模块支持 例如:7zCon.sfx
这是一个使用命令压缩和解压文件的7-zip,从官方网站下载它的zip包,因为windowsXP/2003可以直接将zip视为特殊的文件夹,所以不用安装winzip就可以打开,然后将里面的7za.exe文件拷贝到C:/windows/ 目录下。这样你就可以通过命令行在任一目录下调用7-zip程序,解压压缩文件,就像在linux上使用tar。
在命令行中输入7za,就会显示7za的帮助:
7-Zip (A) 4.42 Copyright (c) 1999-2006 Igor Pavlov 2006-05-14
Usage: 7za
[<@listfiles...>]
a: Add files to archive
d: Delete files from archive
e: Extract files from archive (without using directory names)
l: List contents of archive
t: Test integrity of archive
u: Update files to archive
x: eXtract files with full paths
-ai[r[-|0]]{@listfile|!wildcard}: Include archives
-ax[r[-|0]]{@listfile|!wildcard}: eXclude archives
-bd: Disable percentage indicator
-i[r[-|0]]{@listfile|!wildcard}: Include filenames
-m{Parameters}: set compression Method
-o{Directory}: set Output directory
-p{Password}: set Password
-r[-|0]: Recurse subdirectories
-scs{UTF-8 | WIN | DOS}: set charset for list files
-sfx[{name}]: Create SFX archive
-si[{name}]: read data from stdin
-slt: show technical information for l (List) command
-so: write data to stdout
-t{Type}: Set type of archive
-v{Size}[b|k|m|g]: Create volumes
-u[-][p#][q#][r#][x#][y#][z#][!newArchiveName]: Update options
-w[{path}]: assign Work directory. Empty path means a temporary directory
-x[r[-|0]]]{@listfile|!wildcard}: eXclude filenames
-y: assume Yes on all queries
所以,简单的,可以使用:
A 将同目录下的zip.zip文件解压到tmp文件夹中.
7za e -o tmp temp.zip
B.将tmp添加到temp.7z压缩包中.
7za a temp.7z tmp
C.将当前目录的所有文件添加到temp.7z压缩包中.
7z a -sfx temp.7z
D.自释放程序制作
7z a -sfx temp.exe *.txt
(*)需要自释放模块支持 例如:7zCon.sfx
-*- 此文章为本人发呆时 ctrl+c , ctrl+v 的结果. 如果损害到您的利益, 可以联系我 QQ: 248078462 -*-