import os
import time
import shutil
from glob import glob
if __name__=="__main__":
F1="待拷贝文件的路径"
F3="要拷贝到的路径"
file_list=glob('%s/*'%(F1))
file_name_list=[os.path.basename(temp) for temp in file_list]
for file_name in file_name_list:
src_path='%s/%s'%(F1,file_name)
dst_path='%s/%s'%(F3,file_name)
if not os.path.exists(dst_path):
shutil.copyfile(src_path,dst_path)
time.sleep(0.1)