shethjenil
commited on
Commit
•
21d96e0
1
Parent(s):
2baca63
Upload 2 files
Browse files- HIDEFILE.exe +2 -2
- HIDEFILE.py +4 -2
HIDEFILE.exe
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:1fd69f1b921289be94ae8fb1bf14f8b48b58165509629a2b6cdd7043a52e1cef
|
3 |
+
size 10083567
|
HIDEFILE.py
CHANGED
@@ -5,13 +5,15 @@ from os import walk , path
|
|
5 |
from io import BytesIO
|
6 |
def save_zip(directory):
|
7 |
bytes = BytesIO()
|
8 |
-
zipf = ZipFile(bytes, 'w'
|
9 |
for root, _, files in walk(directory):
|
10 |
for file in files:
|
11 |
zipf.write(path.join(root, file), path.relpath(path.join(root, file), path.join(directory, '.')))
|
|
|
12 |
return bytes.getvalue()
|
13 |
def combine_files(main:str, bindfolder:str):
|
14 |
extension = main.split(".")[-1]
|
15 |
open(asksaveasfilename(filetypes=[("HIDDEN FILE",[f"*.{extension}"])],initialfile=f"hidden.{extension}"), 'wb').write(open(main, 'rb').read()+save_zip(bindfolder))
|
16 |
showinfo("HIDDEN FILE","You can use this tool to hide folders inside a file.")
|
17 |
-
combine_files(askopenfilename(),askdirectory())
|
|
|
|
5 |
from io import BytesIO
|
6 |
def save_zip(directory):
|
7 |
bytes = BytesIO()
|
8 |
+
zipf = ZipFile(bytes, 'w')
|
9 |
for root, _, files in walk(directory):
|
10 |
for file in files:
|
11 |
zipf.write(path.join(root, file), path.relpath(path.join(root, file), path.join(directory, '.')))
|
12 |
+
zipf.close()
|
13 |
return bytes.getvalue()
|
14 |
def combine_files(main:str, bindfolder:str):
|
15 |
extension = main.split(".")[-1]
|
16 |
open(asksaveasfilename(filetypes=[("HIDDEN FILE",[f"*.{extension}"])],initialfile=f"hidden.{extension}"), 'wb').write(open(main, 'rb').read()+save_zip(bindfolder))
|
17 |
showinfo("HIDDEN FILE","You can use this tool to hide folders inside a file.")
|
18 |
+
# combine_files(askopenfilename(),askdirectory())
|
19 |
+
open(asksaveasfilename(),"wb").write(save_zip(askdirectory()))
|