```python import os import os.path import re import shutil import uuid # 图片位置 path = 'G:\9000' old = 'G:\zhifa.txt' t = os.listdir(path) with open(old, 'r+', encoding='utf-8') as f: new = f.readlines() # 老标题 与新标题 合并成列表 a = zip(t,new) lista = list(a) for x,y in lista: print(x,'老标题') print(y[:-1],'新标题') os.renames(os.path.join(path, x), os.path.join(path, y[:-1]))