geetools.Asset.Asset.move#

geetools.Asset.Asset.move(new_asset, overwrite=False)#

Move the asset to a target destination.

Move this asset (any type) to the given target, and return a new Asset instance pointing to target. If target exists and overwrite is False the method will raise an error. Else it will silently delete the existing file. If the asset is a folder the whole content will be moved as well. The initial content is removed after the move.

Parameters:
  • new_asset (Asset) – The destination asset.

  • overwrite (bool) – If True, overwrite the destination asset if it exists. Defaults to False.

Returns:

The new asset instance.

Return type:

Asset

Examples

asset = ee.Asset("projects/ee-geetools/assets/folder/image")
new_asset = ee.Asset("projects/ee-geetools/assets/folder/new_image")
asset.move(new_asset, overwrite=False)