# encoding: utf-8
import os
for a in os.listdir(‘E:\Media\AGC‘):
filename= a.decode("GBK").encode("utf-8")
if "黄征 -" in filename:
z= ‘E:\Media\AGC‘+‘\\‘+a
print z,filename
fjob=open(z,‘rb‘)
text=fjob.readlines()
#print text
fjob2=open(‘E:\\Media\\‘+"\xbb\xc6\xd5\xf7-"+a[7:],‘ab‘)
fjob2.writelines(text)
fjob.close()
fjob2.close()
本文出自 “闲来看看云” 博客,请务必保留此出处http://johnnyfox.blog.51cto.com/1025246/1355251