title: Python: Using Glob to find specific sub-folder
body: <p>I am looking to recursively search through a folder containing many sub-folders. Some sub-folders contain a specific folder that I want to loop through. </p>
  
  <p>I am familiar with the glob.glob method to find specific files:</p>
  
  <pre><code>import glob, os
  from os import listdir
  from os.path import isfile, join
  
  os.chdir(pathname) #change directory to path of choice
  files = [f for f in glob.glob("filename.filetype") if isfile(join(idir, f))]
  </code></pre>
  
  <p>Some sub folders in a directory have a time stamp (YYYYMMDD) as their names all containing identical file names. Some of those sub folders contain folders within them with a name, let's call it "A". I'm hoping to create a code that will recursively search for the folder within called "A" within these "specific sub folders". Is there a way to use glob.glob to find these specific sub-folders within a directory?</p>
  
  <p>I am aware of a similar question:
  <a href="https://stackoverflow.com/questions/14798220/how-can-i-search-sub-folders-using-glob-glob-module-in-python">How can I search sub-folders using glob.glob module in Python?</a></p>
  
  <p>but this person seems to be looking for specific files, whereas I am looking for pathnames. </p>