Created
December 5, 2018 22:51
-
-
Save motleytech/f6b2b6f9d3aedef6bcebb766a03c0ba2 to your computer and use it in GitHub Desktop.
Rsync like functionality using python distutils.dir_util.copy_tree
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 sys | |
import distutils.log | |
import distutils.dir_util | |
import os | |
if len(sys.argv) != 3: | |
print ('Usage : python pysync2.py src dest') | |
exit(1) | |
src, dest = map(os.path.abspath, sys.argv[1:]) | |
distutils.log.set_verbosity(distutils.log.DEBUG) | |
distutils.dir_util.copy_tree( | |
src, | |
dest, | |
update=1, | |
verbose=1, | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment