import os,shutilfor filename in open(result.out): shutil.copy(os.path.join(r'文件夹A',filename+'.mol'),r'文件夹B')