I'm trying to write a script that looks into a dataset and list all the elements in the dataset. The dataset comprises of Feature classes and FGDB Toppology. When I uses ListFeatureClasses, it outputs all the feature classes in the dataset,so I know the code works, but I want to list also the topology file. ListFiles does not work. Which of the List functions should I use to list topology? This is the code I have so far:
import arcpy import os PATH1 = r"C:\Users\Daimon Nurse\Desktop\DFMPROJECT\DFM.gdb" PATH2 = r"C:\Users\Daimon Nurse\Desktop\DFMPROJECT\Complete Final Capstone Map\Z2 Map File Geodatabase.gdb" arcpy.env.workspace = PATH2 arcpy.env.overwriteOutput=True for data in arcpy.ListDatasets(): if data == "AllZones": print data + "1" path = os.path.join(PATH2,data) print path arcpy.env.workspace = path for file in arcpy.ListFiles(): print file
If I change arcpy.ListFiles() to arcpy.ListFeatureClasses(), the code works as I stated above.