AnsweredAssumed Answered

delete shapefiles starting with a certain word

Question asked by sotriant on Jun 11, 2018
Latest reply on Jun 11, 2018 by bixb0012

i want to create a script that will delete shapefiles, that exist in a number of folders, starting with a specific word i.e "points". I have created the following function but i cannot figure out how to care for the specific word. Any ideas?


def deleteShps(point_shp, sortedStops, Route_shp, Stops_shp, ExpStops_shp, Store_shp):
   if arcpy.Exists(point_shp):
   if arcpy.Exists(sortedStops):
   if arcpy.Exists(Route_shp):
   if arcpy.Exists(Stops_shp):
   if arcpy.Exists(ExpStops_shp):
   if arcpy.Exists(Store_shp):