title: WindowsError:[Error 123] When Replace in filename "%3" by ":"
body: <p>I am running this script:</p>
  
  <pre><code>import os
  
  for filename in os.listdir("."):
      newname = filename.replace("%3",":")
      if newname != filename:
          os.rename(filename,newname)
  </code></pre>
  
  <p>which throws:</p>
  
  <blockquote>
    <p>WindowsError: [Error 123] The filename, directory name, or volume
    label syntax is incorrect:</p>
  </blockquote>
  
  <p>Any idea why this happens?</p>
  
  <p>thanks in advance</p>