import os
import glob
import shutil
seq_dir = os.path.expanduser('./')
img_files=glob.glob(seq_dir + '*.xml')
dstpath = './all/' #目标目录
for img_file in img_files:
img_file1 = img_file[:-4]+'.jpg'
shutil.copy(img_file, dstpath)
shutil.copy(img_file1, dstpath )