Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Copy all files and folders from some root

Tags:

python

In python, is there an easy method for copying all files and folders from some root to some destination root? Creating all non-existent directories along the way, of course..

edit how does this change if the root destination directory already exists?

like image 313
coffee Avatar asked Jan 19 '23 23:01

coffee


1 Answers

distutils.dir_util.copy_tree

like image 174
Pratik Deoghare Avatar answered Jan 27 '23 19:01

Pratik Deoghare