How to use to find files recursively?
There are a couple of ways: pathlib.Path().rglob() Use pathlib.Path().rglob() from the pathlib module, which was introduced in Python 3.5. from pathlib import Path for path in Path(‘src’).rglob(‘*.c’): print(path.name) glob.glob() If you don’t want to use pathlib, use glob.glob(): from glob import glob for filename in glob(‘src/**/*.c’, recursive=True): print(filename) For cases where matching files beginning with … Read more