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") ~ ~ ~ ~