os path glob get all files in subdirectories code example Example: python glob subdirectories import glob subdirectories = glob.glob("./*/")