This is a simple python script which renames all the files in a folder to a new name which consists of a prefix and an incrementing index. This can be really useful in renaming files such as digital pictures, etc which can sometimes overlap in their naming.
import os# this is the count at which the new filenames will start
index = 117
# this is an optional prefix to each filename before the index above
prefix = 'condo '
# this is the folder in which to rename all the files
pixDir = '~/work/pix/temp'# iterate over the pix and rename them
os.chdir( pixDir)
for f in os.listdir( pixDir):
newName = '%s%s.jpg' % ( prefix, index)
print f, '->', newName
os.rename( f, newName)
index = index + 1