# 代码示例
代码语言:javascript复制import os
godir = os.listdir('F:cka认证oldboy_go')
for i in godir :
print(i)
if i.count('樱花论坛') :
filename = i.split('【樱花论坛 www.sakuraaaa.com】',1)[1]
print(filename)
oldname = 'F:/cka认证/oldboy_go/' i
newname = 'F:/cka认证/oldboy_go/' filename
os.rename(oldname,newname )