Created
October 28, 2013 21:25
-
-
Save chasevida/7205079 to your computer and use it in GitHub Desktop.
Recursively rename files based on extensions.
In this particular case, rename files with the '.png' extension to '@2x.png' for retina files not already labelled as such within a given directory.
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
find . -type f -name '*.'png -print | while read file; do echo "renaming $file to $(basename $file .png)@2x.png"; mv "$file" "$(dirname $file)/$(basename $file .png)@2x.png"; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment