ImageMagick complains when image is missing while stitching together tiles of an image
You should be able to do this with wildcards. The shell will expand to existing files:

convert -append 0_*jpeg 0a.jpg &amp;&amp;
convert -append 1_*jpeg 1a.jpg &amp;&amp;
convert -append 2_*jpeg 2a.jpg &amp;&amp;
convert -append 3_*jpeg 3a.jpg &amp;&amp;
convert -append 4_*jpeg 4a.jpg &amp;&amp;
convert -append 5_*jpeg 5a.jpg &amp;&amp;
convert -append 6_*jpeg 6a.jpg &amp;&amp;
convert +append *a.jpg 0_final.jpg