From 858e1f289219c04d975217df20111048f90cc818 Mon Sep 17 00:00:00 2001 From: BarsTiger Date: Fri, 7 May 2021 22:16:50 +0300 Subject: [PATCH] 1 --- .../FilesConnector/FilesConnector.py | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 OfficialProjects/FilesConnector/FilesConnector.py diff --git a/OfficialProjects/FilesConnector/FilesConnector.py b/OfficialProjects/FilesConnector/FilesConnector.py new file mode 100644 index 0000000..90077d8 --- /dev/null +++ b/OfficialProjects/FilesConnector/FilesConnector.py @@ -0,0 +1,40 @@ +import os, easygui, time +from os.path import basename +from subprocess import * +slash = '\\' + +start = easygui.buttonbox("Open file (image, text, sound, what you want) to push archive in", "FilesConnector", ("Browse file", "Cancel")) + +if start == "Cancel": + exit() + +if start == "Browse file": + thisFile = easygui.fileopenbox(filetypes=["*.mp3", "*.jpg", "*.png", "*.txt", "*.banana", "*.allWhatYouWant"]) + +start = easygui.buttonbox("Open archive", "FilesConnector", ("Browse archive", "Cancel")) + +if start == "Cancel": + exit() + +if start == "Browse archive": + thisArchive = easygui.fileopenbox(filetypes=["*.rar", "*.zip", "*.7z", "*.meowarch", "*.RandomArch", "*.allWhatYouWant"]) + +filename, file_extension = os.path.splitext(thisFile) +archname, arch_extension = os.path.splitext(thisFile) + +nameofreadyfile = easygui.enterbox("Enter name of hidden archive:") + file_extension + +start = easygui.buttonbox("Now, choose folder to save hidden archive in", "FilesConnector", ("Browse folder", "Cancel")) +if start == "Cancel": + exit() + +if start == "Browse folder": + wheretosave = easygui.diropenbox("Where to save archive?") + +batnik = open('connect.bat', "w+") +batnik.write('copy /b ' + thisFile + "+" + thisArchive + " " + wheretosave + slash + nameofreadyfile) +batnik.close() + +call('start connect.bat', shell=True) +time.sleep(1) +os.remove("connect.bat")