Created
April 10, 2020 16:21
-
-
Save CodeLongAndProsper90/f2d1a1b099e6c51f4039ef33194a5ad0 to your computer and use it in GitHub Desktop.
Make an ISO the easy way
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import os.path | |
import shutil | |
files = [] | |
while True: | |
print("[1]: Add files to staging area.") | |
print("[2]: Generate ISO.") | |
print("[3]: Abort.") | |
choice = input("> ") | |
if choice == '1': | |
File = input("What file do you want? ") | |
if os.path.exists(File): | |
files.append(File) | |
else: | |
print(f"{File}: No such file or directory") | |
elif choice == '2': | |
os.mkdir('temp') | |
for item in files: | |
shutil.move(item, 'temp') | |
os.system('genisoimage -o data.iso temp') | |
elif choice == '3':break | |
else: | |
print("Not found") | |
~ | |
~ | |
~ | |
~ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment