How do you copy files from one location to another?

John Salerno johnjsal at gmail.com
Fri Jun 17 17:27:27 EDT 2011


On Jun 17, 2:23 pm, Terry Reedy <tjre... at udel.edu> wrote:

> If you follow the second part of Greg's suggestion 'or one of the other
> related function in the shutil module', you will find copytree()
> "Recursively copy an entire directory tree rooted at src. "

Yeah, but shutil.copytree says:

"The destination directory, named by dst, must not already exist"

which again brings me back to the original problem. All I'm looking
for is a simple way to copy files from one location to another,
overwriting as necessary, but there doesn't seem to be a single
function that does just that.



More information about the Python-list mailing list