Select to view content in your preferred language

ArcCatalog Search for Feature Classes

2515
3
04-10-2015 11:54 AM
Status: Closed
Labels (1)
RobertBorchert
Honored Contributor

Similar Idea to a Windows search of your hard drive.  This would be built into Catalog such that you could select a folder or hard drive and it will search all folders and subfolders for ShapeFiles and Feature Classes in file and personal geodatabases.

Say I have a feature I created for a specific task called SearchToolExplained and it resides in a database or as a shapefile in a folder and I cannot remember where I put it.  I could then in ArcCatalog search for SearchToolExplained and it would then search all Shapefiles and databases and find all instances of that Feature Class.

 

3 Comments
MarkVolz
Hello,
This python script will search vector but not raster layers....

import arcpy, sys, os

#arcpy.env.workspace = "D:\Lakeland_GIS\GDB\Lakeland\Lakeland.gdb"

orig_stdout = sys.stdout
f = file('gislayers.txt', 'w')
sys.stdout = f
feature_classes = []
for dirpath, dirnames, filenames in arcpy.da.Walk(workspace,datatype="FeatureClass"):
    for filename in filenames:
        feature_classes.append(os.path.join(dirpath, filename))
        thisline = "Dir Path, " + dirpath + ", Dataset, " + filename
        print thisline
sys.stdout = orig_stdout
f.close()
 
RobertBorchert
I see a lot of people posting solutions wiht Python but I really have no idea what to do witht he script you posted.  

I used to write VB and looking at the script you posted it lookas as though it is only going to search a specified database.
AletaVienneau
Status changed to: Closed

Hi @RobertBorchert

ArcGIS Desktop is in mature support and will be retired March 1, 2026 so we won’t be considering this idea. We recommend that you migrate to ArcGIS Pro, our fully supported desktop GIS application.

In ArcGIS Pro it is possible to search a folder connection in your project and get a list of all the shapefiles and geodatabase feature classes it contains; this capability is described in the Search the project help topic. You can also create a search index that is independent of a specific project and search for any data it contains in any project you open; you can learn about this in the "Manage the index" help topic under the heading Index project items in specified locations.

Thank you for taking the time to share your ideas. We truly appreciate your contributions to continuously improving the software to help you do your work and look forward to what ideas you have for ArcGIS Pro.

Aleta