When you work with a sequence of numbered file names, a common problem is that the names get sorted in the wrong order. This is because file names are always treated as text, not as numbers, and alphabetically “10.jpg” comes before “1.jpg”. The solution is to “pad” the name with zeros. This means to make the names all have a certain length (say 4 characters), by adding (or “padding”) the name with extra “0”’s. These extra zero’s come before the actual number. For instance: 0001.jpg, 0002.jpg, 0003.jpg, 0004.jpg, 0005.jpg, 0006.jpg, 0007.jpg, 0008.jpg, 0009.jpg, 0010.jpg, 0011.jpg, etc. Zero-padded names will sort the same way alphabetically as numerically.