rpowersau at gmail.com wrote: > >>> for i in range(1,21): > ... localf = 'file%2s' %i Try 'file%.2d' (note the decimal point). It's almost the same as C printf format strings, so man 3 printf may be of use (as well as the Python on-line docs). Cameron.