I use mogrify as such:
mogrify -monitor -quality 80 -resize 1200 *JPG
However, this only matches files ending in .JPG. How do I include .jpg files at the same time (in other words, how to make the pattern case-insensitive)?
I use mogrify as such:
mogrify -monitor -quality 80 -resize 1200 *JPG
However, this only matches files ending in .JPG. How do I include .jpg files at the same time (in other words, how to make the pattern case-insensitive)?
Simply append the new filenames mogrify -monitor -quality 80 -resize 1200 *.JPG *.jpg
. The wildcards are expanded by the shell before mogrify
starts.
If you have the possibility of extensions like *.JpG
, filenames with spaces, etc, use
find . -maxdepth 1 -type f -iname '*.jpg' -print0 |\
xargs -0 --no-run-if-empty mogrify -monitor -quality 80 -resize 1200
Read man find xargs
.