I can copy a shapefile but I want to be able to overwrite the copied shapefile to prevent multiple copies being created each time I run the program. I would also like for the saving and renaming of the copied shapefile to happen behind the scenes i.e. the user doesnt see a gxDialog box.
How do I overwrite the copied file, either as a shapefile or feature class?
Best Answer
Before making the copy of the feature class, you can open the containing workspace and check the existance of the feature class (IWorkspace2.NameExists), and if exists then delete it (IDataset.Delete).
Example: