Copy directory contents into a directory with python [duplicate]

I found this code working which is part of the standard library:

from distutils.dir_util import copy_tree

# copy subdirectory example
from_directory = "/a/b/c"
to_directory = "/x/y/z"

copy_tree(from_directory, to_directory)

Reference:

Leave a Comment