Alright, that is really bizarre. You're right, that code will only loop through one dataset?!?!The data I originally tested it on only had one dataset so I never noticed.Not sure if that's a bug or what but it doesn't work in 10.0 or 10.1!But, if you do it like this, it will work...import arcpy, os
arcpy.env.workspace = os.getcwd()
# For each ws, print the fc's and tbl's.
for ws in arcpy.ListWorkspaces("*", "FileGDB"):
arcpy.env.workspace = ws
# feature classes
for fc in arcpy.ListFeatureClasses():
print "fc: "+fc
# tables
for tbl in arcpy.ListTables():
print "tbl: "+tbl
# feature classes in datasets
for ds in arcpy.ListDatasets():
print "ds: "+ds
for dfc in arcpy.ListFeatureClasses("*", "All", ds):
print "fc in ds: "+dfc