---
title: "压缩&解压工具"
author: "Perrin Yong"
author_profile: https://www.pystone.net/profile/
published_by: "Perrin Yong"
canonical: https://www.pystone.net/notes/compression-decompression-tools/
type: note
content_role: unspecified
visibility: public
id_stability: rename-stable
source_path: "10-计算机、信息技术与工程/03-软件工程与质量保障/CI-CD与质量保障/CI-CD工具链/压缩&解压工具.md"
content_hash: c09f99637ef534cec04fa8ff3698d5ed130369692d4eba137366c8e7c02c46d3
knowledge_version: 224c990773de.5fa8af6e39fa
site_commit: 224c990773de166d23a886306577dd90379529ce
notes_commit: 5fa8af6e39fa3891d1b9b4832bfa6c4e0ecaaf0a
---
# 压缩&解压工具

> 创建时间：2021/4/13 17:27

  * 压缩&解压
    * Windows
      * Bandizip
        * Commands 命令
        * Switches 开关
        * Demo
    * Ref

## Windows

### Bandizip

[Bandizip](https://cn.bandisoft.com/bandizip/help/parameter/)是一款很好用的压缩软件，支持命令行使用。利用命令行进行批处理可以大大提高工作效率。
命令格式:

```cpp
string s = String.Empty;

```

#### Commands 命令

a 添加文件到档案
x 用完整路径提取文件
t 测试档案的完整性
d 从档案中删除文件
c 创建新的压缩包(zip)（或覆盖现有文件），第二个参数为添加进压缩包的文件
cd 显示“新建档案”对话框
rn 重命名档案内文件
l 列出档案中的文件（仅用bz）

#### Switches 开关

常用的：
-p:{password} 设置档案密码
-y 所有询问都为是。若无错误发生，则在任务完成时关闭（解）压缩窗口

#### Demo

创建压缩文件包并添加文件

```cpp
string s = String.Empty;

```

添加文件到压缩包

```cpp
string s = String.Empty;

```

重命名abc.txt为xyz.txt

```cpp
string s = String.Empty;

```

## Ref

https://cn.bandisoft.com/bandizip/help/parameter/
