I currently have approximately six hundred old .mxds, and all the data source links are broken due to an upgrade in the GIS computer.

In the past, all the spatial data was stored as shapefiles in nested folders ie 2009/2009-040-01/BurialSites.shp or 2005/J2005-022/J2005-022aoi.shp. The data was organized by year, and to some extent, by the associated project.

What I would like to do is import all the old data into a geodatabase and use a python script to repair all the broken data sources in an efficient manner.

file organization

The issue with the shapefiles organized in this manner is that certain projects from 2009 will reference past projects, which makes manually repairing the data sources a frustrating and time consuming process.

referencing old map projects

Ideally, I would like to do is organize the old shapefiles into a geodatabase so it is not quite so messy, and fix the map documents using this geodatabase.

The main issue I have is that there are multiple shapefiles with the same name (Export_Output.shp), and when these are brought into the geodatabase a number is attached as a suffix (Export_Output_1, Export_Output_2 etc). In many instances the data with the same name but in a different folder is completely unrelated, but in other cases it is the same feature, but with an additional field in the attribute table.

It appears as though there are three options -

1) Import the shapefiles into a geodatabase and attempt to repair the broken data links

2) Keep the shapefiles in the current folders and repair the broken data sources

3) Repair the data sources in each map document on an 'as-needed' basis

Does anyone have advice on importing shapefiles into a geodatabase and repairing the data links before I spend lots of time on it? How big of an issue is it that file names have had a number tagged on the end?

This is not a priority job, but it is something that I would like to eventually finish.

  • I think you need to establish feature class (and table) naming conventions for your target geodatabase first. Once you know what you want to call an old dataset in the geodatabase you should be able to use a Python script with ReplaceDataSource etc to update all your MXDs. How complex this script becomes will depend on how much your geodatabase "mirrors" your original datasets.
    – PolyGeo
    Jan 7, 2014 at 1:36
  • That is what I thought. The vector data is spread throughout 3835 folders within the main file, with dozens of identically named shapefiles, so I think I will leave the data as is and try the answers below.
    – Adam Thom
    Jan 7, 2014 at 17:48

2 Answers 2


This is a temporary fix to get your mxd files working. You can create an additional Alias to your data by using Windows symbolic links. This means you can make your data appear to be located at the old location for the mxds to open properly. The shapefiles, etc will not move or be copied. There is a command line tool called mklink that will create a link. You may only need a link to your root data folder. If you are interested in this, search the web for symbolic link or junction.


My workflow would be...
Use windows explorer.
Search the root folder for *.shp.
Drag all shape files into empty arcmap document.
Set document projection to desired output gdb projection.
Check that all shape files line up. If not remove them. (You will have to discover projection separately). Open tools and find convert to gdb (multiple).
Select all files and run the tool.
Not programmatic but that's how I do it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.