7Z-Bat调用7z压缩所有文件

点击量:203

7Z-Bat调用7z压缩所有文件

下载7z.exe

https://www.7-zip.org/download.html

7z_json.bat

@echo off

set PATH_CONFIG_JSON=resource\*.json
set PATH_CONFIG_JSON_IGNORE=7z_ignore.txt
set ZIP_PATH_CONFIG_JSON=resource\allconfigjson.zip

echo 压缩.json文件

7z a -r %ZIP_PATH_CONFIG_JSON% %PATH_CONFIG_JSON% -xr@%PATH_CONFIG_JSON_IGNORE%

Pause

忽略某些目录某些文件

-xr@%7z_ignore.txt

7z_ignore.txt

resource\.svn
resource\.git
resource\ignorefolder
resource\ignore.res.json

参考