-1

I am using the copy tree library in python (example below) however I want the script to copy the whole folder and not just the contents inside the folder. Would addition or modification would I need to rectify this issue

  import copy_tree from distutils.dir_util 
  copy_tree(src, dst)
9000
  • 39,899
  • 9
  • 66
  • 104
M.Ustun
  • 289
  • 2
  • 6
  • 16

1 Answers1

0

Create the folder with the same name at your destination, then use copy_tree?

9000
  • 39,899
  • 9
  • 66
  • 104
  • You're input is valued however is there a way to copy the folder as a whole with the same name across? – M.Ustun Mar 21 '17 at 15:54
  • Try [`shutil.copytree`](https://docs.python.org/2/library/shutil.html#shutil.copytree) then. – 9000 Mar 21 '17 at 17:15