Select to view content in your preferred language

Point Data Sources to New Drive all at once?

268
5
Jump to solution
08-01-2025 08:42 AM
ODWC_GIS
Frequent Contributor

You remember how in ArcMap you could choose to "store relative path names," so that if a drive was suddenly different you could correct it for a single layer, and then ArcMap would go on to correct it for all the other layers?

My government-managed PC suddenly decided that what had always been the D:\drive is now the E:\drive.  And since it is government-managed, there's effectively no way for me-the-user to change the drive itself.

Now all the ArcPro Projects and Layers that are stored on the D:\drive-turned-E:\drive are "missing," according to ArcGIS Pro.  I've already spent one day repointing the data sources for all the layers in a single massive project to the new location, one by one.

Does anyone know how I might remap the drive source en masse for my various ArcGIS Pro projects and layers?  (Not all layers are pulled from that drive, but there are so many...)

0 Kudos
1 Solution

Accepted Solutions
RichardDaniels
Honored Contributor

I agree, ArcGIS Pro needs an ASPX Doctor!.

So, in ArcGIS Pro they do use relative path names to the data. However, your issue is ALL the files have moved (but hopefully the file paths are the same). In that case, please recall the following, once a layer or layerx file is opened in an ArcGIS Project the information is stored within the project (i.e., it does not reference the .lyr or .lyrx file directly once loaded).  This means if the layer referenced a database, the database connection information is stored in the project.aprx, not the path to the layer file itself. 

If one has the project open you can use the Catalog View. You can update the paths in one item, such as a single map in the project, or access all the paths in the project. You can find and replace specific strings in the paths. To update paths in the current project, see Update data sources—ArcGIS Pro | Documentation.

Second Option, update the Project path itself "within" the aprx, thus allowing the relative paths to work. To do this, recall that the .aprx file is actually a ZIP file. So, rename the project.asp to project.zip then copy the DocumentInfo.xml file out of it, edit in NotePad++, then copy-replace back into the original .aprx.

RichardDaniels_0-1754069242666.png

Save the file and copy into the .zip; Rename the .zip back to .aprx. The next time you open the project it will use the NEW project path as the start of the relative pathing to your other files.

View solution in original post

5 Replies
ODWC_GIS
Frequent Contributor

Yep, so far, I've been correcting each layer one at a time.  I see that your link says that correcting a layer in the Contents pane will correct all others in a similar location all at once, but that hasn't happened for me.  The real kicker is when I run a 90+ page Map Series, but overlooked the little reference locator maps' datasets... 3 hours later I look at the output only to find that the little maps are hollow.  Fix those layers, then re-run the Map Series.

0 Kudos
RhettZufelt
MVP Notable Contributor

to correct all in similar location at once, you need to click the red exclamation point, not go to data source.

R_

0 Kudos
RichardDaniels
Honored Contributor

I agree, ArcGIS Pro needs an ASPX Doctor!.

So, in ArcGIS Pro they do use relative path names to the data. However, your issue is ALL the files have moved (but hopefully the file paths are the same). In that case, please recall the following, once a layer or layerx file is opened in an ArcGIS Project the information is stored within the project (i.e., it does not reference the .lyr or .lyrx file directly once loaded).  This means if the layer referenced a database, the database connection information is stored in the project.aprx, not the path to the layer file itself. 

If one has the project open you can use the Catalog View. You can update the paths in one item, such as a single map in the project, or access all the paths in the project. You can find and replace specific strings in the paths. To update paths in the current project, see Update data sources—ArcGIS Pro | Documentation.

Second Option, update the Project path itself "within" the aprx, thus allowing the relative paths to work. To do this, recall that the .aprx file is actually a ZIP file. So, rename the project.asp to project.zip then copy the DocumentInfo.xml file out of it, edit in NotePad++, then copy-replace back into the original .aprx.

RichardDaniels_0-1754069242666.png

Save the file and copy into the .zip; Rename the .zip back to .aprx. The next time you open the project it will use the NEW project path as the start of the relative pathing to your other files.

ODWC_GIS
Frequent Contributor

Huh.  Alright, that looks more like what I'll be doing first thing next week.

That second portion of the link you provided (Update data sources—ArcGIS Pro | Documentation), took me to a portion of ArcPro I hadn't visited before!  

Many Thanks!

0 Kudos