Files
kefu/deploy/single-instance-tray-20260917/install_instance_guard.py
T
2026-09-21 10:34:06 +08:00

14 lines
540 B
Python

from pathlib import Path
import shutil
source = Path(__file__).resolve().parent
for project in (Path(r'C:\wechat_rpa'), Path(r'C:\kefu\wechat_rpa')):
backup = project / 'backups' / 'single-instance-tray-20260917'
backup.mkdir(parents=True, exist_ok=True)
for name in ('desktop_instance.py', 'test_desktop_instance.py'):
target = project / name
if target.exists() and not (backup / name).exists():
shutil.copy2(target, backup / name)
shutil.copy2(source / name, target)
print(target)