AnsweredAssumed Answered

Delete Files Stored in ArcCatalog

Question asked by MisureJon on Sep 26, 2017
Latest reply on Sep 26, 2017 by jayanta.poddar

So I am writing a script that exports a feature class then zips it up and emails it to whoever needs it.  I am having trouble because I need to be able to delete the exported shapefiles so that I can use this tool and not have old exported data in the zip file.  I can not use CopyFeature_Management because some of the data is not a shapefile (Image of that is below). So I have to use FeatureClasstoShapefile_conversion instead which doesn't let me overwrite the previously exported shapefiles.  So I just end up getting shapefiles with a _1 after them. I am either doing this wrong or I need to find some way of deleting files in ArcCatalog without doing so manually.  I have os.remove() to delete the zip file, but its just that darn