I'm new in python scripting and try to list polyline feature classes of multiple Geodatabases. The Geodatabases are in many nested folders.For example in folder "A" I have 20 folders and in each folder i have 3 geadatabases. the question is that how can i list the feature classes of the geodatabases using Arcpy. I know simple Python codes to list feature classes in a folder such as :
import arcpy
from arcpy import env
env.workspace = ".././Data/6"
fclist = arcpy.ListFeatureClasses()
print fclist
I surf in this site and found a Q&A about How to list feature classes in multiple Geodatabases in a folder? . It was very useful but only for multi Geodatabases not multi folders.
Best Answer
The arcpy.da.Walk function from ArcGIS 10.1 SP1 allows you to do this. The following script walks through a workspace, create a list of every polyline, and copies the polylines to an output workspace.