Skip to content

Instantly share code, notes, and snippets.

@medwig
Created April 13, 2019 17:21
Show Gist options
  • Save medwig/b2619609468260ff08c7a0ab9175dc5c to your computer and use it in GitHub Desktop.
Save medwig/b2619609468260ff08c7a0ab9175dc5c to your computer and use it in GitHub Desktop.
Copy files from $HOME folder with python
import os
import shutil
HOME = os.path.expanduser('~')
FILES = [
".bashrc",
".vimrc",
]
for file in FILES:
src = f"{HOME}/{file}"
dst = f"./{file}"
print(f"copying", src, "to >", dst)
shutil.copyfile(src, dst)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment