# copyfile .py
from shutil import copyfile
from sys import exit
source = 'D:\\testData\\123.png' # 源路径
target = 'D:\\123.png' # 目标路径
# adding exception handling
try:
copyfile(source, target) # copyfile 函数调用
except:
print('copy file faild')