Created
May 31, 2013 01:26
-
-
Save dansku/5682443 to your computer and use it in GitHub Desktop.
Renaming JPEGmini files with Python
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 filename in os.listdir("."): | |
if filename.endswith('_mini.jpg'): | |
mini = filename.find('_mini.jpg') | |
name = filename[:mini] + '.jpg' | |
os.rename(filename, name) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment