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 [...] [...]
[]



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

转载于:https://www.cnblogs.com/yoshow/archive/2007/10/23/935320.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值