title: WindowsError: [Error 2] The system cannot find the file specified
body: <p>I am having a problem with this code. I am trying to rename all of the filenames within a folder so that they no longer have <code>+'s</code> in them! This has worked many times before but suddenly I get the error: </p>
  
  <p><code>WindowsError: [Error 2] The system cannot find the file specified at line 26</code> </p>
  
  <p>Line 26 is the last line in the code.</p>
  
  <p>Does anyone know why this is happening? I just promised someone I could do this in 5 minutes because I had a code! Shame it doesnt work!!</p>
  
  <pre><code>import os, glob, sys
  folder = "C:\\Documents and Settings\\DuffA\\Bureaublad\\Johan\\10G304655_1"
  
  for root, dirs, filenames in os.walk(folder):
      for filename in filenames:
          filename = os.path.join(root, filename)
  old = "+"
  new = "_"
  for root, dirs, filenames in os.walk(folder):
      for filename in filenames:
          if old in filename:
              print (filename)
              os.rename(filename, filename.replace(old,new))
  </code></pre>