This is what I have:
glob(os.path.join(\'src\',\'*.c\'))
but I want to search the subfolders of src. Something like this would work:
<
import os, glob
for each in glob.glob('path/**/*.c', recursive=True):
print(f'Name with path: {each} \nName without path: {os.path.basename(each)}')
glob.glob('*.c')
:matches all files ending in .c
in current directoryglob.glob('*/*.c')
:same as 1glob.glob('**/*.c')
:matches all files ending in .c
in the immediate subdirectories only, but not in the current directoryglob.glob('*.c',recursive=True)
:same as 1glob.glob('*/*.c',recursive=True)
:same as 3glob.glob('**/*.c',recursive=True)
:matches all files ending in .c
in the current directory and in all subdirectories