Someone asked how to have python recursively search a folder structure. There may be a better way but this is how I typically do it–it basically starts with one directory and loops through the contents compiling a list of sub-directories as it goes through the contents.
import glob, os theDir = 'c:/temp/' theDirList = [] theDirList.append(theDir) while len(theDirList) > 0: newDirList = [] for iDir in theDirList: print iDir for iFile in glob.glob(iDir+"/*"): if (os.path.isdir(iFile)): newDirList.append(iFile) theDirList = newDirList
Use os.walk ( http://docs.python.org/library/os.html#os.walk ).
Thanks, Jason!
http://arcpy.wordpress.com/2012/02/22/recursive-list-feature-classes/
Thanks for the handy utility, jpardy84. The user I was helping needed to look at all files, just not feature classes but I know at some point that will come up so your code will be helpful.