Summary
Repairs broken file paths or deletes broken links within an unmanaged raster catalog or a mosaic dataset.
Usage
It can also be used to delete any broken links that are no longer needed.
You need to know the file path location in order to change it. You can use the Export Raster Catalog Paths tool to retrieve the original path names.
You can type an asterisk (*) as the original path if you wish to change all your paths.
If you need to repair a mosaic dataset, the Repair Mosaic Dataset dialog box can also achieve this task. To learn more about repairing mosaic datasets, see Repairing paths in a mosaic dataset.
Syntax
arcpy.management.RepairRasterCatalogPaths(in_raster_catalog, repair_mode, {original_path}, {new_path})
Parameter | Explanation | Data Type |
in_raster_catalog | The unmanaged raster catalog or mosaic dataset to be repaired. | Raster Catalog Layer; Mosaic Dataset; Group Layer; Composite Layer |
repair_mode | Choose the repair mode you would like to use.
| String |
original_path (Optional) | Type the original path that needs to be repaired. This is a required parameter if the FIX option was chosen. If you want to change all your paths to the new path, you are able to use the asterisk (*) as the original path. | String |
new_path (Optional) | Type the new path to use. This is a required parameter if the FIX option was chosen. | Folder |
Code sample
RepairRasterCatalogPaths example (Python window)
This is a Python sample for the RepairRasterCatalogPaths tool.
import arcpy
arcpy.RepairRasterCatalogPaths_management("c:/data/RepairRC.gdb/bkrnlinks",
"FIX", "*", "C:/data/newpath")
RepairRasterCatalogPaths example 2 (stand-alone script)
This is a Python script sample for the RepairRasterCatalogPaths tool.
##=====================
##Repair Raster Catalog Paths
##Usage: RepairRasterCatalogPaths_management in_raster_catalog FIX | REMOVE {original_path} {new_path}
import arcpy
arcpy.env.workspace = r"C:\PrjWorkspace"
##Fix Broken Path - regardless of original paths
arcpy.RepairRasterCatalogPaths_management("RepairRC.gdb\\Unmanaged", "FIX", "*", r"C:\data")
##Remove Broken Items
arcpy.RepairRasterCatalogPaths_management("RepairRC.gdb\\Unmanaged2", "REMOVE", "", "")
Environments
This tool does not use any geoprocessing environments.
Licensing information
- Basic: Yes
- Standard: Yes
- Advanced: Yes