# -*- coding: utf-8 -*-
import os
def delete_file(dirname):
filelist = os.listdir(dirname)
for file in filelist:
oldpath = os.path.join(dirname,file)
filename = os.path.splitext(file)[0]#文件名
filetype = os.path.splitext(file)[1]#文件类型
if filename[0] == '_':
os.remove(oldpath)
delete_file("F:\\保险条款\\txt")