0

my organization is a large ESRI user and we are under going some hardware changes. My question is:

Is there a way to move several shapefiles scattered across many folders (in one server) to another, completely new server, in an efficient manner without compromising the integrity of associated MXD files?

I'm aware that I can cut and paste the folders over but that would take ages as I'd have to reset each MXD file's layers data source to the correct path. This is the main concern.

Perhaps there might be python solution however my scripting ability is weak.

Any ideas?

2 Answers 2

1

Depending on your time-frame, you might look at this as an excellent opportunity for you to dive into Python scripting, as it would be very appropriate for this task.

First, you could use ArcPy to make a GIS inventory. You could load the results of your inventory into your favorite database, where you could set up columns for old pathnames vs new pathnames.

Next, you could use ArcPy to Generate MXD layer info report. As part of this process, as you loop through layers, you could compare the data source paths of the layers in each MXD to those in your database using the pyodbc module. When you find a match, you could then use

Layer.replaceDataSource(workspace_path, workspace_type, dataset_name, {validate})

to replace the old data source with the new data source, as @Jerry mentioned in the Updating and fixing data sources with arcpy.mapping online help.

1

See this link:

Updating and fixing data sources with arcpy.mapping

You will need to determine the old/new paths of your data and create a program using these examples.

In the future establish procedures and policies for your users so that this does not happen again. Keep your data organized.

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.