I've looked at this question, and while it works there a few issues:
- All converted images are placed in the directory from which the command is called.
- The original images are kept.
I need to convert around 70,000 .tif and .jpgs to .pngs. It's really important the the files when converted are placed in their normal directories.
I can do a batch rm of .tff/.jpg's at the end if that's the best way to handle removing the old files.
Best Answer
find . -iname "*.jpg" -type f
: search for file ending with ".jpg" case insensitive$(dirname $f)
: relative path to the folder containing file $f$(basename -s .jpg $f)
: filename without the suffix ".jpg"In old Ubuntu basename may need to be run with different way:
Convert is a part of imagemagick (As reference see Batch Processing tif images: Converting .tif to .jpeg) , to install