AnsweredAssumed Answered

arcpy.Delete_management not working on particular shpfiles.

Question asked by Stevenson_S15_uu_scobe on Apr 24, 2018
Latest reply on Apr 24, 2018 by rvburton

Hi folks, I've been stuck on this for ages. Hopefully someone might have some tips. I have some code to delete a .shp file.

 

arcpy.env.workspace = "C:/check"
ws = arcpy.env.workspace
in_data = "Folklore.shp"
data_type = ""

arcpy.env.overwriteOutput = True
arcpy.Delete_management(in_data, data_type)
arcpy.Delete_management('Folklore.shp')

 

The shp file just won't delete. It seems to make it stop working but not delete. It is a points shp file. This code works fine if I delete a polygon shp file. So I don't think it is a problem with the code. Does anybody know of any particular issues with deleting certain types of shp files. There are no lock files. And ArcMAP and ArcCatalog are closed.

 

Thanks

Outcomes