i'm stumped... i get strange results from string[10:] to get the last 10 characters from a string?
the code supposed to rename a batch of file sequentially and the number of numbers needs to be consistent eg. 00001 - 99999
thanks for the help
import os
x=0
for file in os.listdir("/path"):
newname = "0000000000" + str(x) + ".dpx"
newname = "/path/koons_" + newname[10:]
(basename, extention) = os.path.splitext(file)
oldname = "/path/" + file
if extention== ".dpx":
x = x+1
print newname
print oldname
#os.rename(file, newname)