I have a path mounted in dbfs and I need to extract Excel files path from a given folder and the same folder contains Excel files or sub folder containing Excel files. Current code only gives Excel files in one folder and not in sub folders.
files = dbutils.fs.ls('/raw/internal/srange/2018_11_30_00_22_11/')
for file in files:
if file.path.endswith('xlsx'):
path = '/dbfs' + file.path[5:]
print(path)