Error [183] when using python os.rename
<p>This is my first time using python and I keep running into error 183. The script I created  searches the network for all '.py' files and copies them to my backup drive. Please don't laugh at my script as this is my first.</p>

<p>Any clue to what I am doing wrong in the script?</p>

<pre><code>import os
import shutil
import datetime

today = datetime.date.today()
rundate = today.strftime("%Y%m%d")

for root,dirr,filename in os.walk("p:\\"):
    for files in filename:
        if files.endswith(".py"):
            sDir = os.path.join(root, files)
            dDir = "B:\\Scripts\\20120124"
            modname = rundate + '_' + files
            shutil.copy(sDir, dDir)
            os.rename(os.path.join(dDir, files), os.path.join(dDir, modname))
            print "Renamed %s to %s in %s" % (files, modname, dDir)
</code></pre>
