delete a shapefile

Mar 11, 2011 at 2:39 PM

Hi people,

i need to delete a shapefile at runtime; first of all, i call the close() function and then i call the system::io::file::delete(shapefile.shp)

but i have an exception:the file is in use...

so, maybe  i need to perform some other operation in addition to close()???

Thanks a lot

Developer
Mar 13, 2011 at 2:02 PM

In case the shapefile was added to the map, try to remove the layer first.  Show us your code in case this won't help.