GeoEco.ArcGIS.GeoprocessorManager.MoveArcGISObject

classmethod GeoprocessorManager.MoveArcGISObject(source, destination, overwriteExisting, correctTypes, typeDisplayName)

Moves the specified ArcGIS object.

First, if overwriteExisting is True and destination exists, it will be deleted with the Delete() geoprocessing tool. Then, if source is a feature class, shapefile, or feature layer, it will be copied with CopyFeatures(). If source is something else, it will be copied with Copy(). Finally, source will be deleted with Delete().

Raises:

ValueError – The source object does not exist or the geoprocessor’s Describe() function reports that it is not one of the types specified by correctTypes, or the destination object exists but either it is not one of the correctTypes or overwriteExisting is False.

Parameters:
  • source (str) – Path to the object to move (e.g. a file, directory, raster, shapefile, table, etc.). Minimum length꞉ 1.

  • destination (str) – New path for the object. Minimum length꞉ 1.

  • overwriteExisting (bool) – If True, destination will be overwritten.

  • correctTypes (list of str) – List of data types that the object is expected to be, chosen from the possible values of the dataType property of the object returned by Describe(). Please see the documentation for that function for the possible values.

  • typeDisplayName (str) – Name of the expected data type of the object to display in logging messages. This is usually a more generic name than the entries that appear in correctTypes. For example, if the object is expected to be some kind of table, correctTypes may contain five or ten possible values, while typeDisplayName might simply be “table”. Minimum length꞉ 1.