I'm looking for a way to search Geodatabases for a Feature Class or Table by using its name.

Is there any function like this available?

Obviously windows search only returns the random ID's for the tables within a Geodatabase. I'd like to actually search for datasets within them.

I think this would help a lot of people, because I know I'm not the only one out there who stores spatial data in Geodatabases, only to archive it with a thousand other datasets and not want to sift through it.

I'd like to search these Geodatabases within ArcCatalog.


3 Answers 3


Another way to search for feature classes, which may or may not be in a dataset is to use the walk function, as mentioned before. It requires only a workspace to search in (i.e. a folder containing hundreds of GDBs).

import arcpy, os
workspace = "Path/to/folder"
search = "name_string_you_are_searching_for"
feature_classes = []
for dirpath, dirnames, filenames in arcpy.da.Walk(workspace,
    for fname in filenames:
        # search for string in string to eliminate the need for exact filenames
        if search.upper() in fname.upper():
            feature_classes.append(os.path.join(dirpath, fname))

The resulting list will contain the paths and filenames of all feature classes that match your search criteria, which can be printed.

for fc in feature_classes:
     print fc

The walk function can also be modified to search for specific types of features (i.e. polygons, points, rasters, etc) by changing type="" to the feature type.


This is a long way of doing what you're asking, using some python:

  1. You need a list of all the GeoDatabases that you want to search. If there are a lot, use python's walk function on the directory in question. Isolate for any folders with a .gdb in them or .mdb, depending on the database.

  2. Find all the datasets within the GeoDatabase.

  3. Find all the layers within the dataset.

  4. Search results from layers for what you are looking for.

Here is a code sample of what I'm talking about:

import arcpy
from arcpy import env
x = 'File Name That You Are Looking For'
GDBs = ['GeoDatabase1', 'GeoDatabase2', 'ect']  # Your list of GeoDatabases
for GDB in GDBs:                                # Iterate through your list
    env.workspace = GDB
    GDBds = arcpy.ListDatasets()                # Find datasets in GeoDatabase
    for ds in GDBds:                            # Iterate through datasets
        env.workspace = GDB + '/' + ds
        fc = arcpy.ListFeatureClasses()         # Find all data in the dataset
        for f in fc:
            if f.find(x) != -1:
                print GDB + '/' + ds + '/' + f    
  • 4
    Not all feature classes are in feature datasets (best practice would result in very few)
    – Vince
    Mar 28, 2014 at 15:30

I came across some software a while ago that may be of use for indexing GeoDatabases and other spatial data:


I trialed it for our company and although we didn't end up using it for various reasons it has loads of useful functionality. In summary it creates an index of your spatial datasets which can then be searched using location - as it records the extent of the data, the name and also (I think) the attributes / contents of the data.

This is they index GeoDB's: https://voyagersearch.zendesk.com/hc/en-us/articles/204187447-Indexing-Esri-Geodatabases-and-Shapefiles

This is their demo page which will do a better job of demonstrating it's capabilities than me! http://voyagerdemo.com/web/navigo/#/home

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.