Created
August 8, 2017 09:55
-
-
Save anonymous/9aabd97b3af38777140b8f3ac63e1684 to your computer and use it in GitHub Desktop.
Renames bad files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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