GDAL-DATASET-RENAME(1)

πŸ“¦
version 3.13.3 Β· 4 versions
, in alpine 3.24, arch rolling, ubuntu stonking

✨ NAME ✨

okay so bestie, say hi to gdal-dataset-rename πŸ’– β€” she's part of the GDAL crew (the manual is just called GDAL, iykyk) and her whole personality is renaming the files of a dataset.

Added in version 3.12.

so like, you run gdal dataset rename and it renames the dataset file(s) β€” and yes, queen, that includes the potential side-car / associated files too, she's not leaving those behind πŸŽ€


🌸 SYNOPSIS 🌸

Usage: gdal dataset rename [OPTIONS] <SOURCE> <DESTINATION>

Rename files of a dataset.

Positional arguments:
  --source <SOURCE>            Source dataset name [required]
  --destination <DESTINATION>  Destination dataset 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]

Options:
  --overwrite                  Whether overwriting existing output dataset is allowed

Advanced Options:
  -f, --format <FORMAT>        Dataset format

πŸ’… OPTIONS πŸ’…

  • --source <FILENAME> β€” the source file name or directory name. Required, bestie, you literally cannot skip it.
  • --destination <FILENAME> β€” the destination file name or directory name. Also required, same energy ✨
  • -f, ---format <FORMAT> β€” the dataset format. This one overrides the automatic format detection, so if you already know what you're working with, you get to call the shots πŸ‘‘
  • --overwrite β€” lets the program overwrite an existing target file or dataset. Without it? she errors out if the target file or dataset already exists, fr fr. Default behaviour is no touching your existing stuff πŸ™ˆ

πŸ”₯ RETURN STATUS CODE πŸ”₯

  • it hands back status code 0 when things go well βœ…
  • and non-zero when it's an error πŸ’€
  • but hear me out β€” non-blocking errors that get emitted as warnings still count as a successful execution, so don't panic if you see a lil warning, okay? 🫢

πŸ¦‹ EXAMPLES πŸ¦‹

Example 1: Rename a dataset

$ gdal dataset rename old_name.tif new_name.tif

peak simplicity, we love to see it ⭐


πŸ‘‘ AUTHOR πŸ‘‘

Even Rouault <even.rouault@spatialys.com> 🌈


1998-2026


and that's the whole page, bestie πŸ’œ she's from the GDAL manual, dated Aug 18, 2026, and the source line reads GDAL-DATASET-RENAME(1) β€” so go rename something and slay, periodt πŸ’…βœ¨

πŸ“¦ where this page comes from