for folder, sub_folders, files in os.walk('D:\\excel'):
print(f"Currently looking at {folder}")
print('\n')
print('The subfolder are: ')
for sub_fold in sub_folders:
print(f"Subfolder: {sub_fold}")
print('\n')
print("the files are: ")
for f in files:
print(f"File: {f}")
I am currently using the os.path to locate all of my files in that current directory, but I only wanted to select files that ended in "RPM_AvgCylP_PStats", I am brand new so I am not really good with the logic.