How do you copy files from one location to another?

Terry Reedy tjreedy at udel.edu
Sat Jun 18 16:52:26 EDT 2011


On 6/18/2011 1:13 PM, Michael Hrivnak wrote:
> Python is great for automating sysadmin tasks, but perhaps you should
> just use rsync for this.  It comes with the benefit of only copying
> the changes instead of every file every time.
>
> "rsync -a C:\source E:\destination" and you're done.

Perhaps 'synctree' would be a candidate for addition to shutil.

If copytree did not prohibit an existing directory as destination, it 
could be used for synching with an 'ignore' function.

-- 
Terry Jan Reedy




More information about the Python-list mailing list