Docs

RunMacro Documentation

Learn RunMacro from basics to advanced.

Everything you need to start and master RunMacro — from basic commands to advanced automation workflows.

RunMacro robot
Docs File Rename File or Folder
✏ File

Rename a file or folder automatically in RunMacro

Rename File or Folder gives an item a new name in place, with a conflict policy, and saves the new path to a variable.

Prerequisites

  • Source exists; write access in its containing folder.

Supported modes

  • Desktop ModeOperates on the local file system.
  • Browser Mode

What it does

The Rename File or Folder command changes the name of a file or folder in place (it stays in the same folder). The new name must be a plain name, without path separators.

When to use it

  • Standardize an output file name.
  • Rename by a variable (order id, date...).
  • Quickly fix a folder name.

When not to use it

  • You want to rename many files at once — use Batch Rename Files.

Configuration steps

  1. Add a File › Rename File or Folder command.
  2. Enter the source path (the file/folder to rename).
  3. Enter the new name (name only, no path).
  4. Choose a conflict policy. Save.

Every option explained

Source path

The file or folder to rename.

New name

A plain name (no / or backslash). Supports variables.

Conflict policy

error, skip, overwrite, or unique_name.

Output variable

Variable that receives the path after renaming (default last_renamed_path).

Expected result

The item has the new name in the same folder; the output variable holds the new path.

Real example

Example: rename by order id

  1. Rename: source {result_file}, new name {order_id}.pdf.

Limitations and failure cases

  • The new name cannot contain path separators.

Tips & common mistakes

The new name is a name, not a path. To move to another folder, use Move File or Folder.

Verification details

  • commands/filesystem.py
RunMacro robot

Ready to automate smarter?

Download RunMacro and start automating your desktop, browser, and business workflows today.