I have a number of shapefiles in a folder but some of them are empty i.e. there are no rows within the shapefile.

Is there a simple way to find those empty shapefiles using ArcPy?

1 Answer 1


Use GetCount.

shapefiles = [r"c:\data.shp", r"c:\data2.shp", r"c:\data3.shp"]
for file in shapefiles:
    if arcpy.management.GetCount(file)[0] == "0":
        print file
  • 2
    If you're all set, use the green arrow to select this answer!
    – Roy
    Commented Sep 11, 2013 at 18:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.