title: Change File extensions for entire folder
body: <p>I am trying to create a script where all the file extensions are changed from .bmp to .jpg. There have been some helpful answers I have found but I still can't get my script to work. If anyone had any suggestions on what I might need to change, it would be greatly appreciated. The script doesn't come up with any errors but none of the file extensions in the folder change.</p>
  
  <pre><code>import os, glob, sys
  folder = '\\stsosage\...\LegalCardsTest'
  for filename in glob.iglob(os.path.join(folder, '*.bmp')):
      os.rename(filename, filename[:-4] + '.jpg')
  </code></pre>