I have a folder with hundreds of GIF images. Some are static, and others are dynamic. How can I separate the static GIFs from the dynamic ones?


You can use a free tool called ImageMagick. It can tell you how many images are in the GIF.

identify -format %n~%f\n *.gif


%n number of images in current image sequence

%f filename (including suffix)

\n newline

The 1 is front indicates how many frames are in the image.

Anything more than 1 we can assume is an animated GIF.

| improve this answer | |
  • it doesn't work with non-ASCII names. I'll try to check encoding. but everything else is working fine, thanks – TarasPro Oct 7 '14 at 22:05
  • Sorry, I do not have any non-ASCII names to try out on my end. – Sun Oct 7 '14 at 22:07
  • It works! Just encoding issue – TarasPro Oct 7 '14 at 22:24

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.