Basically, if identify returns more than one row for a GIF, it is more likely to be animated because it contains more than one image. However, you can get false positives.
Shell Usage Example:
for i in *.gif; do
if [ `identify "$i" | wc -l` -gt 1 ] ; then
echo move "$i"
else
echo dont move "$i"
fi
done
source
share