title: Why os.rename() is raising an exception in Python 2.7?
body: <pre><code>print(path)
  print(dir_name+"\\"+f_parent+"_"+parts[0]+"_"+date+extension)
  os.rename(path, dir_name+"\\"+f_parent+"_"+parts[0]+"_"+date+extension)
  </code></pre>
  
  <p>Lines 1 &amp; 2 are debug and statements and these print:</p>
  
  <pre><code>D:\Doc\Papa\Photos\2012\2012_07_divers\CSC_3709.jpg
  D:\Doc\Papa\Photos\2012\2012_07_divers\2012_07_divers_CSC_3709_2012_07_06_21_04_26.jpg
  </code></pre>
  
  <p>Line 3 raises:</p>
  
  <pre><code>File "D:\Doc\Papa\scripts\python\photosort\photosort.py", line 83, in rename
    os.rename(path, dir_name+"\\"+f_parent+"_"+parts[0]+"_"+date+extension)
  WindowsError: [Error 183] Impossible de créer un fichier déjà existant
  </code></pre>
  
  <p>which translates to:</p>
  
  <pre><code> WindowsError: [Error 183] Can not create a file that already exists
  </code></pre>