This code allows you to enter a directory/folder path and then recursively walks through all of the subdirectories and creates a text file with the full paths to all file geodatabases under the specified path. Makes use ofthe fact that all FGDB's seem to have a file called 'gdb' (no extension) within them.
Pretty useful for those of us that maintain a complex file structure (like the SGID's ftp site) or are just organizationally challenged.
import sys import os import string
searchFile = 'gdb' cacheFolder = None
try: home = sys.argv[1] except IndexError,e: print "Please enter your home directory: (no trailing slash) " home = raw_input()