Skip to content

Instantly share code, notes, and snippets.

@tjmichael81
Created August 28, 2015 19:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tjmichael81/46e89defb9e0f5eac605 to your computer and use it in GitHub Desktop.
Save tjmichael81/46e89defb9e0f5eac605 to your computer and use it in GitHub Desktop.
Sort and print feature classes stored in geodatabase datasets
import arcpy
arcpy.env.workspace = r'<path_to_gdb>'
dsList = arcpy.ListDatasets()
for ds in dsList:
fcList = sorted(arcpy.ListFeatureClasses(None, None, ds))
print ('Feature Dataset: {0}\n').format(ds)
for fc in fcList:
print fc
print '\n\n'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment