fabianmoronzirfas
4/14/2013 - 8:20 AM

rename_images.py

# Goes a little something like this:

import os

files = [ f for f in os.listdir('.') if os.path.isfile(os.path.join('.',f)) and f.endswith('.jpg') ]
for i, file in enumerate(sorted(files)):
    os.rename(file, 'image%03d.jpg' % i)


# Now with them renamed you can do something like:
# convert image%03d.jpg[0-293] animated_gif.gif