import os, shutil dst = 'output/original-submission' os.makedirs(dst, exist_ok=True) for f in ['article.md', 'metadata.json', 'editor-notes.md', 'check.py', 'trim.py']: if not os.path.exists(os.path.join(dst, f)): shutil.copy2(os.path.join('output', f), os.path.join(dst, f)) print(sorted(os.listdir(dst)))