Use Path.glob() to list all files and directories. And then filter it in a List Comprehensions.
p = Path(r'C:\Users\akrio\Desktop\Test').glob('**/*')
files = [x for x in p if x.is_file()]
More from the pathlib module:
- pathlib, part of the standard library.
- Python 3’s pathlib Module: Taming the File System