Skip To Content

Repair Mosaic Dataset Paths


Resets paths to source imagery if you have moved or copied a mosaic dataset.


  • You need to know the file path location in order to change it. You can use the Export Mosaic Dataset 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.

  • Database fragmentation and frequent data manipulation can dramatically increase the size of your mosaic dataset. If your database size is inflated due to constant transactions, run the Compact tool.


RepairMosaicDatasetPaths_management (in_mosaic_dataset, paths_list, {where_clause})
ParameterExplanationData Type

The mosaic dataset with the broken paths.

Mosaic Layer
[[original_path, {new_path}],...]

A list of the paths to remap. Include the current path stored in the mosaic dataset and the path to which it will be changed. You can enter an asterisk (*) as the original path if you wish to change all your paths.

Value Table

An SQL expression to limit the repairs to selected rasters within the mosaic dataset.

SQL Expression

Code sample

RepairMosaicDatasetPaths example 1 (Python window)

This is a Python sample for RepairMosaicDatasetPaths.

import arcpy
     "\\\\server1\\md\\fgdb.gdb\\md c:\\storage\\md\\mdgdb.gdb\\md", 
RepairMosaicDatasetPaths example 2 (stand-alone script)

This is a Python script sample for RepairMosaicDatasetPaths.

#Repair mosaic dataset paths

import arcpy
arcpy.env.workspace = "C:/Workspace"

mdname = "repairmd.gdb/md"
paths = "e:/temp/data c:/storage/mddata/e;d:/temp/data c:/storage/mddata/d"
query = "#"

arcpy.RepairMosaicDatasetPaths_management(mdname, paths, query)


This tool does not use any geoprocessing environments.

Licensing information

  • ArcGIS Desktop Basic: No
  • ArcGIS Desktop Standard: Yes
  • ArcGIS Desktop Advanced: Yes