title: Remove numbers from all files names in a folder
body: <p>I am trying to remove all numbers from all filenames for files in a folder:</p>
  <pre><code>import os
  import re
  infolder = r'E:/folder/test'
  def file_rename():
      name_list=os.listdir(infolder)
      print(name_list)
      saved_path=os.getcwd()
      print(&quot;Current working directory is&quot;+saved_path)
      os.chdir(infolder)
  
      for file_name in name_list:
          print(&quot;old name&quot;+file_name)
          print(&quot;new name&quot;+re.sub('[0-9]', '', file_name))
          os.renames(file_name,file_name.strip(&quot;0123456789&quot;))
      os.chdir(saved_path)
  
  file_rename()
  </code></pre>
  <p>It's correctly printing the new filenames but is not actually changing the files names in the folder.</p>