Skip to content

Instantly share code, notes, and snippets.

Created August 8, 2017 09:55
Show Gist options
  • Save anonymous/9aabd97b3af38777140b8f3ac63e1684 to your computer and use it in GitHub Desktop.
Save anonymous/9aabd97b3af38777140b8f3ac63e1684 to your computer and use it in GitHub Desktop.
Renames bad files
import os
for old in os.listdir('img'):
os.rename(os.path.join('img', old),
os.path.join('img', bytes(old,'iso-8859-1').decode('utf-8')))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment