参考 Python对文件进行重命名 - 云+社区 - 腾讯云
import os
srcFile = './actwork/linkFile/allExtLinks - 副本.txt'
dstFile = './actwork/linkFile/allExtLinks - copy.txt'
try:
os.rename(srcFile,dstFile)
except Exception as e:
print(e)
print('rename file fail\r\n')
else:
print('rename file success\r\n')