AnsweredAssumed Answered

Copytree Question

Question asked by cwholmes on Oct 18, 2016
Latest reply on Oct 18, 2016 by cwholmes

Good day everyone,


I have a python script that:

  • creates a new folder using user input for part of the folder name
  • copies 6 files plus one file geodatabase into the folder
  • then opens up one of the mxd files

The following layers in the source file geodatabase have the following database locations:

  • layer: transnet_centerline_for_labeling:

  • layer: bridge_polygons:


In the python script I use copytree to copy the file geodatabase to the destination location:


Somehow the database location for these 2 layers is being changed in the file geodatabase when it is in the new location. For example:

  • layer: transnet_centerline_for_labeling:

  • layer: bridge_polygons:


Of course H:\geo_databases does not exist, so the layers display with red exclamation marks:



Does anybody have any idea why this path may be changing to a folder that doesn't exist. Is there something in how the database source path is defined that the layer is looking to what ever drive it happens to be mapped to? Although it's not just a difference of the drive letter, the change is from X:\GIS\geo_databases to H:\geo_databases.


Thanks for the help,