Created
April 13, 2019 17:21
-
-
Save medwig/b2619609468260ff08c7a0ab9175dc5c to your computer and use it in GitHub Desktop.
Copy files from $HOME folder with python
This file contains 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 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