import os import shutil import re #获取指定文件中文件名 def get_filename(filetype): name =[] final_name_list = [] source_dir=os.getcwd()#读取当前路径 for root,dirs,files in os.walk(source_dir): for i in files: if filetype in i: name.append(i.replace(filetype,'')) fi…
import numpy as np import os path = 'F:\\wenjian'#指定文件所在路径 filetype ='.csv'#指定文件类型 def get_filename(path,filetype): name =[] final_name = [] for root,dirs,files in os.walk(path): for i in files: if filetype in i: name.append(i.replace(filetype,''))#生…