I have a folder containing photos coming from different cameras.

I use Imagemagick to convert to resized and renamed photos in another folder.

Something like this:

convert "*.jpg" \
    -resize 640 -scene 1 \

The problem is some cameras save photos with "JPG" extension, others with "jpg".

To solve this I used to rename extensions with this:

rename .JPG .jpg *.JPG 2> /dev/null

This won't work on filesystems where I have only read access. How do I glob in IM both *.jpg and *.JPG files?

Thanks for your help

1 Answer 1


I got it:

convert "*.{jpg,JPG}" \
    -resize 640 -scene 1 \

from here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.