import glob # path to search file path = '.' for file in glob.glob(path+"/*.html", recursive=True): print(file) Copy Code