import os, sys for root, dirs, files in os.walk(".") : for name in files : if name.lower()[-4:] != ".png" : continue if name == ".temp.png" : os.system("del .temp.png") continue filename = root + "\\" + name os.system("copy /b \"%s\" .temp.png" % filename) os.system("pngcrush -q -force -rem gAMA -rem cHRM -rem iCCP -rem sRGB -rem tEXt -rem zTXt -ztxt b \"Author\" \"Tone Marie Berg\" .temp.png \"%s\"" % filename) os.system("del .temp.png") for i in xrange(6) : os.system("pngout /y /f%d /kzTXt \"%s\"" % (i, filename))