log("加密="+加密())
log("解密="+解压())
function 加密() {
try {
let dir = '/sdcard/脚本/模块/';
// 2.加密压缩文件夹
let encryptedZipFile = '/sdcard/项目.zip';
$files.remove(encryptedZipFile);
$zip.zipDir(dir, encryptedZipFile, {
password: '123456'
});
return true
} catch (e) {
return false
}
}
function 解压() {
try {
//解压加密的zip
$zip.unzip('/sdcard/项目.zip', '/sdcard/', {
password: '123456'
});
return true
} catch (e) {
return false
}
}
Auto.js 压缩 解压 加密文件
最新推荐文章于 2026-07-03 10:00:10 发布
这篇博客介绍了如何使用脚本进行文件的加密和解压操作。通过`加密()`函数,利用$zip.zipDir()方法和密码对指定目录进行加密压缩,然后使用`解压()`函数配合密码解压加密后的zip文件。整个过程涉及到了文件管理和加密解密技术。

2467

被折叠的 条评论
为什么被折叠?



