Quick tip on how to convert recursively multiply PNG files to JPG format. What do we need:
- Linux
- Bash
- RMagick
- Recursively stored PNG files
- A bit of patience ;)
First lets convert all the PNG files:
find ./ -name "*.png" -exec mogrify -format jpg {} \;
And after this, if everything went fine, we can remove all PNG "leftovers":
find ./ -name "*.png" -exec rm {} \;
Of course remember to change the ./ directory into your PNG files directory.
April 2, 2014 — 12:14
Works beautifully on MacOS as well, but your example contains “echo” which should be removed if you want it to convert anything :)