Last active
April 2, 2018 02:09
-
-
Save dayitv89/d11069be04aa1eda1193ab34884b2786 to your computer and use it in GitHub Desktop.
Python script to rename all files in folder
This file contains hidden or 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 | |
# convert all image like `<Any_name>_2x.png` to `<Any_name>@2x.png` | |
[os.rename(f, f.replace('_2x', '@2x')) for f in os.listdir('.') if not f.startswith('.')] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment