GDAL-VSI-MOVE(1) GDAL GDAL-VSI-MOVE(1)

gdal-vsi-move - Move/rename a file/directory located on GDAL Virtual System Interface (VSI)

Added in version 3.11.

Usage: gdal vsi move [OPTIONS] <SOURCE> <DESTINATION>
Move/rename a file/directory located on GDAL Virtual System Interface (VSI).
Positional arguments:
  --source <SOURCE>            Source file or directory name [required]
  --destination <DESTINATION>  Destination file or directory name [required]
Common Options:
  -h, --help                   Display help message and exit
  --json-usage                 Display usage as JSON document and exit
  --config <KEY>=<VALUE>       Configuration option [may be repeated]
  --progress                   Display progress bar

gdal vsi move move files and directories located on GDAL Virtual File Systems (compressed, network hosted, etc...): /vsimem, /vsizip, /vsitar, /vsicurl, ....

If the destination path is an existing directory, the file will be moved to it.

It can move files and directories between different virtual file systems, but this will involve copying and deletion.

Note that for cloud object storage, moving/renaming a directory may involve renaming all files it contains recursively, and is thus not an atomic operation (and could be slow and expensive on directories with many files!)

This is implemented by VSIMove().

This is an analog of the UNIX mv command, and gdal vsi mv is an alias for gdal vsi move.

$ gdal vsi move /vsis3/bucket/my.tif /vsis3/bucket/new_name.tif

$ gdal vsi move /vsis3/bucket/my.tif /vsis3/bucket/existing_subdir

$ gdal vsi move /vsis3/bucket/my_directory /vsigs/bucket/

Even Rouault <even.rouault@spatialys.com>

1998-2025

May 6, 2025