Repair Mosaic Dataset Paths (Data Management)
Summary
Repairs broken file paths within a mosaic dataset.
Usage
-
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 may increase the size of your mosaic dataset dramatically. If your database size is inflated due to constant transactions, you should run the Compact tool.
Syntax
Parameter | Explanation | Data Type |
in_mosaic_dataset |
The mosaic dataset to be repaired. | Mosaic Layer |
paths_list [Original Path {New Path},...] |
A list paths to remap, including the current path stored in the mosaic dataset and the path to which it will be changed. | Value Table |
where_clause (Optional) |
Using SQL, you can define a query or use the Query Builder to build a query. | SQL Expression |
Code Sample
This is a Python sample for RepairMosaicDatasetPaths.
import arcpy
arcpy.RepairMosaicDatasetPaths_management(
"C:/Workspace/repairmd.gdb/md",
"\\\\server1\\md\\fgdb.gdb\\md c:\\storage\\md\\mdgdb.gdb\\md",
"#")
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)