Two times a year a positional check of railway assets is performed in ArcGIS Pro for 21 different areas by receiving updated data. Every half a year in each area new data is automatically prepared in a standardized structure and needs to be loaded in a new ArcGIS project file (.aprx). Therefore the file paths in the .aprx file should change to the new data based on the area and date. I know the .aprx files can be unzipped to show .xml files, but I am not sure of best way to edit all the filepaths to load the new data.

This problem is very similar to editing file paths in QGIS .qgz files.

How can I change the file paths in the .aprx file easily?

  • 3
    Hacking the .aprx is least easy option, when you can just use Python to change the layer definition.
    – Vince
    Feb 19, 2020 at 13:43
  • Hi Vince. Thanks for your comment and solution, but I would like to change the layer definition without using ArcPy since ArcPy is not easily available on linux virtual machines or windows virtual machines on which the data is processed
    – Davma
    Feb 19, 2020 at 14:12
  • 1
    I have not tried this but you could use python to rename the .aprx file extension to .zip, extract the contents of the zip, in the map folder re-write the layer xml and change the WorkspaceConnectionString and Dataset tag values to point to a new database/layer location/layer name, then zip up all the files, and rename the .zip file back to .aprx.
    – artwork21
    Feb 19, 2020 at 14:42
  • Thanks artwork21. That seems to be a solution that can be implemented on a linux virtual machine
    – Davma
    Feb 19, 2020 at 14:47
  • Update: I was able to unzip the .aprx file, see all the filepaths in the xml files and edit the filepaths, but I was not able to zip the .aprx file back together, because there seems to be protection on the .aprx file. Perhaps somebody else can figure out how to zip .aprx files back together. ArcPy also was not able to change the filepaths due to an unsolved bug.
    – Davma
    Mar 14, 2020 at 10:40

2 Answers 2


Workaround solution which worked: use .aprx file with relative filepaths (./layername.shp), keep .aprx files and data in same directory and only change the name of the .aprx file for each area.


In the view tab of ArcGIS Pro, use the 'Catalog View' button to open the catalog. Open the Map folder, double click your map item, then use the Data Sources tool from the ribbon to open the file current and new paths for each layer in your map. They can be edited individually, or with the Find and Replace tool to do it en mass, just like ctrl+f in excel. Once you're happy, hit the dropdown under apply to Apply and Validate.

Not quite as precise as you'd like but perhaps you can make it work despite your qualifers.

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.