python glob
from glob import glob
import os
from pprint import pprint
import os
current_path = os.getcwd()
files = glob(f"{current_path}/**", recursive=True)
pprint(files)
For Markdown Files
from glob import glob
import os
from pprint import pprint
import os
current_path = os.getcwd()
files = glob(f"{current_path}/**/*.md", recursive=True)
pprint(files)
Sources
- python - Getting a list of all subdirectories in the current directory - Stack Overflow
- https://docs.python.org/3/library/glob.html