一个简单的"每天定时加密压缩指定文件夹"的小工具
import shutil
import subprocess
import os
import schedule
import time
import logging
from pathlib import Path
def encrypt_folder_with_winrar(folder_path, password):
# WinRAR命令
winrar_command = r'C:\Program Files \WinRAR\WinRAR.exe'
# 获取当前日期
current_date = time.strftime("%Y-%m-%d", time.localtime())
# 获取桌面BD文件夹路径
desktop_path = str(Path.home() / "Desktop")
bd_folder_path = os.path.join(desktop_path, "DB")
# 创建DB文件夹(如果不存在)
if not</