Skip to content

Instantly share code, notes, and snippets.

@driscollis
Last active July 10, 2018 17:10
Show Gist options
  • Save driscollis/7bf16f738c93c1759289744040505f40 to your computer and use it in GitHub Desktop.
Save driscollis/7bf16f738c93c1759289744040505f40 to your computer and use it in GitHub Desktop.
import os
import shutil
def copy_files_from_file(file_path):
with open(file_path) as f:
for line in f:
dirname, filename = os.path.dirname(line), os.path.basename(line)
proj_dir = os.path.join(dirname, 'ProjectData')
if os.path.exists(proj_dir):
shutil.move(match, os.path.join(proj_dir, filename))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment