Python: read a text file and copy/paste directories listed in it to a new directory
<p>I am trying to read a .txt file that lists directory names and copy/paste the listed directories into a new directory. I am pretty close to figuring it out but need a function that copies the directory (not only its contents). </p>

<pre><code>from distutils.dir_util import copy_tree

dst = '/Users/name/Desktop/Core/TEST'
f = open('/Users/name/Desktop/Core/Core_List.txt','r')
for i in f.readlines():  
    print i
    copy_tree(i.strip(), dst)

f.close()
</code></pre>

<hr>

<p>This is what ended up working:</p>

<pre><code>from shutil import copytree
from os.path import join

dst = '/Users/name/Desktop/Core/TEST'
f = open('/Users/name/Desktop/Core/Core_List.txt','r')
for i in f.readlines():
    print i
    copytree(i.strip(), join(dst,i))

f.close()
</code></pre>