import os,os.path
import re
# def print_pdf(root,dirs,files):
# for file in files:
# path=os.path.join(root,file)
# path=os.path.normcase(path)
# if re.search(r".*\.pdf",path):
# print(path)
# for root,dirs,files in os.walk('.'):
def print_pdf(root,dirs,files):
'''扫描查找对应文件'''
for file in files:
path=os.path.join(root,file)
path=os.path.normcase(path)
if re.search(r".*\.pdf",path):
print(path)
for root,dirs,files in os.walk('.'):
print_pdf(root,dirs,files)