English

Problem: Data source paths for layers change after moving a map document to a different folder

Description

When moving a map document (MXD) to a different folder on the same computer, the data source paths of the layers in the MXD change.

Cause

This issue occurs when the 'Store relative pathnames to data sources' properties of the map document is enabled. This option may have been enabled to store full pathnames for a map document and all layers in the same directory or subdirectories. This means when a file  used in a map is in a certain location, for instance, C:\data\hydro\rivers.shp, the full pathname to the layer is stored in the map document. This option is enabled to use relative paths to deliver map documents and layers to another machine or user without the missing layers in the map document.

In some cases, it may be desirable to preserve absolute paths instead of using relative paths. This is because when using absolute paths, if a layer is moved to a different disk, ArcGIS can still find the layer, unlike when relative paths are used. For relative paths, the referenced data either moved to the same path, or the links to the data source repaired to locate the layer's data source manually when ArcGIS cannot find the layer. For more information on repairing data source, refer to Repairing broken data links.

Solution or Workaround

To maintain data source paths when moving map documents, disable relative paths for map documents in the Map Document Properties dialog box using the instructions provided below:

Note:
This option disables relative paths only for the current map document.
  1. Open the map document in ArcMap.
  2. On the main menu, click File > Map Document Properties.
  3. Uncheck the Store relative pathnames to data sources check box.
An image of the Map Document Properties dialog box.
Note:
For an alternative option to disable relative paths, refer to How To: Set relative paths for all map documents in a folder using Python. Copy and replace 'mxd.relativePaths = True' with 'mxd.relativePaths = False', and run the script. This script disables relative paths for multiple map documents within a folder.

Related Information