Can you explain why you need to convert the count into a string?
I'd been trying to make this work for a little while and that was my problem - hadn't converted count into string.
import arcpy from arcpy import env env.workspace = r"C:\Temp\Test.gdb" listFCs = arcpy.ListFeatureClasses("*") for fc in listFCs: count1 = str(arcpy.GetCount_management(fc)) if count1 == "0": arcpy.Delete_management(fc)
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.