python 复制文件并重命名,copy多份规律文件
【C:\Users\Jason Chen\Desktop\demo\test.xlsx】为被复制路径下的文件,
【C:\Users\Jason Chen\Desktop\demo\test{i}.xlsx】为生成后路径下的文件。
import shutil
for i in range(1, 11):
shutil.copy(r"C:\Users\Jason Chen\Desktop\demo\test.xlsx",
fr"C:\Users\Jason Chen\Desktop\demo\test{i}.xlsx")