Suggestions for salvaging a corrupt shapefile are described below. They are listed in the order they should be performed. Common causes of corruption include a computer crash while saving edits; adding invalid geometry, for example, bow ties; and modifying the attribute table with other software, such as Microsoft Excel. If the suggestions listed below do not salvage the shapefile, revert to the backup.
- Use the Check Geometry geoprocessing tool. Problems with the data are reported while the tool is executing or in the output table. View the output table after execution. An empty table indicates that the tool found no bad geometry. If bad geometry is reported, use the Repair Geometry geoprocessing tool.
- Run the Repair Geometry tool. After running the Repair Geometry tool, run the Check Geometry tool to ensure that all corrupt features have been removed. Repeat this process as many times as necessary.
- Export the data to a geodatabase, then copy it to a new shapefile.
- Select all or a subset of the features and export the selected features to a new shapefile or feature class.
- If the data is on a network drive, copy it to a local drive. If the data is on a local drive, try copying it to the root of the primary drive; for example, C:\.
- Check for invalid field names in the attribute table. Field names can only have 10 characters. Field names must start with a letter. Field names must not contain any spaces or special characters, except for the underscore character.
- File names must not contain any special characters, except for the underscore character. Generally speaking, spaces in shapefile names work in ArcGIS Desktop; however, for testing purposes, rename the shapefile so it has no spaces.
- Remove all index (spatial, attribute, and geocoding), projection, and metadata files in Windows Explorer. That is, remove all files except .shp, .dbf, and .shx. Make a copy of each of these files before removing them.
- Open the shapefile on another computer.
- Open the shapefile with another version of the software application. If it can be opened, save it as a new shapefile by exporting the selected features to a new shapefile or feature class.
- Copy the data to a new feature class using the simple data loader or by copying the features to an ArcMap edit session. If the shapefile does not contain many features, copy the features one at a time or in groups to determine if specific features are corrupt. After copying the features, save your edits. Verify whether the problem has been resolved.
- If the data is still not repaired, and the first two suggestions above reported the feature IDs of the bad records, try manually removing them in an editing session.
- Import the .dbf part of the shapefile into Microsoft Excel and save it as a dBASE 4 file. Do not make any other changes to the file.
- Try making a field calculation in ArcGIS Desktop using the field calculator. The field calculator may stop on the corrupt record.
- Delete all fields in the shapefile except the FID, Shape, and one attribute field (shapefiles must have at least one attribute field). If the problem persists, add a new string field and delete the last remaining attribute field. If the problem is resolved, this indicates a problem with one of the fields. Revert to the backup shapefile and use a process of elimination to determine the corrupt field.