Last active
August 29, 2015 14:05
-
-
Save on-three/1c3fe6977153a87c2877 to your computer and use it in GitHub Desktop.
convert images and rename in 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
cp -r dir1 dir1_copy | |
#find ./dir1_copy -type f -iname "*.jpg" -exec sh -c "echo {}; mogrify -format png {}; rm {}" \; | |
find ./dir1_copy -type f -name "*.jpg" -exec sh -c 'echo $1; convert "$1" "${1%.jpg}.png"; rm $1' _ {} \; | |
find ./dir1_copy -type f -iname "*.txt" -exec sh -c "echo {}; sed -i 's/\.jpg\"/\.png\"/g' {}" \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment