标签:图片 TE ase div print org mes pat base
import shutil import os # files = os.listdir(‘C:/Users/kaige/Desktop/四元玉鉴/FORGED-full - 副本/693-693‘) # base_path = ‘C:/Users/kaige/Desktop/四元玉鉴/FORGED-full - 副本/693-693/‘ # -------------------- # 获取文件名称 files = os.listdir(‘C:/Users/kaige/Desktop/四元玉鉴/FORGED-full - 副本/720-720‘) base_path = ‘C:/Users/kaige/Desktop/四元玉鉴/FORGED-full - 副本/720-720/‘ file_names = files[:-1] prefix14 = ‘14HP_‘ prefix18 = ‘18HP_‘ to_path14 = ‘C:/Users/kaige/Desktop/四元玉鉴/FORGED-full - 副本/693-693-14/‘ to_path18 = ‘C:/Users/kaige/Desktop/四元玉鉴/FORGED-full - 副本/693-693-18/‘ # ----------------------------------------------------- prefix01 = ‘01HP_‘ prefix02 = ‘02HP_‘ prefix17 = ‘17HP_‘ prefix18 = ‘18HP_‘ prefix19 = ‘19HP_‘ to_path01 = ‘C:/Users/kaige/Desktop/四元玉鉴/FORGED-full - 副本/720-720-01/‘ to_path02 = ‘C:/Users/kaige/Desktop/四元玉鉴/FORGED-full - 副本/720-720-02/‘ to_path17 = ‘C:/Users/kaige/Desktop/四元玉鉴/FORGED-full - 副本/720-720-17/‘ to_path18 = ‘C:/Users/kaige/Desktop/四元玉鉴/FORGED-full - 副本/720-720-18/‘ to_path19 = ‘C:/Users/kaige/Desktop/四元玉鉴/FORGED-full - 副本/720-720-19/‘ def cp666(names, oldpath, newpath): for name in names: # 从哪 --- > 复制到哪 shutil.copyfile(oldpath + name, newpath + name) # cp 14 # cp666(file_names, base_path, to_path14 + prefix14) # cp 18 # cp666(file_names, base_path, to_path18 + prefix18) # ----------------------------- sp ----------------------- # cp 01 cp666(file_names, base_path, to_path01 + prefix01) # cp 02 cp666(file_names, base_path, to_path02 + prefix02) # cp 17 cp666(file_names, base_path, to_path17 + prefix17) # cp 18 cp666(file_names, base_path, to_path18 + prefix18) # cp 19 cp666(file_names, base_path, to_path19 + prefix19) print(‘ok‘)
标签:图片 TE ase div print org mes pat base
原文地址:https://www.cnblogs.com/412013cl/p/9117097.html