Skip to content

RENAME command

FireBlade edited this page May 9, 2026 · 1 revision

Changes the name of a file.

Usage

rename <SRC> <TARGET> [options]

Arguments

  • <SRC>
    The source file to rename.

  • <TARGET>
    The target name to rename to.

Options

Note

The annotations 🪟 and 🐧 indicate that an option is only available on either Windows or Linux, respectively.

  • /U (--preserve-undo, -u) 🪟
    Preserve undo information, if possible.

  • /O (--files-only, -o) 🪟
    Perform the operation only on files (not on folders) if a wildcard file name (*) is specified.

  • /R (--recursive, -r) 🪟
    Recursively operate into subdirectories.

  • /E (--rename-on-collision, -e) 🪟
    Give the file being operated on a new name in a rename operation if a file with the target name already exists at the destination.

  • -v (--overwrite, /V) 🐧
    Overwrite the file if it already exists at the destination.

  • /? (/h, -h, --help)
    Show help and usage information.

Aliases

ren, rn

Clone this wiki locally