refer to example code
..
import os
from glob import glob
start_dir = '/start/folder' #os.getcwd()
pattern = "*.jpg" #file extension which you want to find
for dir,_,_ in os.walk(start_dir):
print( glob(os.path.join(dir,pattern)) )
..
Thank you.
www.marearts.com