I am having trouble copying directories
<p>I am trying to copy my Automater workflows, I have listed them in a config file, and I would like to loop through the config file and copy the directories.  They have spaces in the names and I am having trouble.</p>

<p>It prints the filename correctly etc but the copy fails as there seems to be extra " " around the name with the copy</p>

<pre><code>import os
import shutil

confdir=os.getenv("my_config")
dropbox=os.getenv("dropbox")
conffile = ('services.conf')
conffilename=os.path.join(confdir, conffile)    
sourcedir= (r'~/Library/Services/')
destdir=os.path.join(dropbox, "My_backups")

for file_name in open(conffilename):
    sourcefile=os.path.join(sourcedir, repr(file_name.strip()))
    print sourcefile
    destfile=os.path.join(destdir, file_name.strip())
    shutil.copytree(sourcefile, destfile)
</code></pre>

<p>And the error is </p>

<pre><code>~/Library/Services/'Add PDF Metadata.workflow'
Traceback (most recent call last):
  File "Untitled 3.py", line 15, in &lt;module&gt;
    shutil.copytree(sourcefile, destfile)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py",     line 168, in copytree
    names = os.listdir(src)
OSError: [Errno 2] No such file or directory: "~/Library/Services/'Add PDF Metadata.workflow'"
</code></pre>

<p>Thanks in advance</p>

<p>I have tried the suggestions below but it still is not working</p>
