# .. | |
import os | |
import io | |
import sys | |
import tempfile | |
from datetime import datetime | |
from pcloud import PyCloud | |
current_datetime = datetime.now().strftime("%Y%m%d_%H%M%S") | |
temp_dir = os.path.join(tempfile.gettempdir(), "") | |
# BackupCurrentProject.bat | |
# https://7-zip.opensource.jp/chm/cmdline/switches/ | |
os.system(f""""C:\\Program Files\\7-Zip\\7z.exe" -t7z -mx7 -mmt2 -ssw -p** -mhe a out{current_datetime}.7z outputs""") | |
pc = PyCloud('**', '**', endpoint="nearest") | |
pc.uploadfile(files=[f'out{current_datetime}.7z'], path=f'/') | |
os.system("pause") | |
sys.exit(1) | |