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

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 Mode — Operates 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
- Add a File › Rename File or Folder command.
- Enter the source path (the file/folder to rename).
- Enter the new name (name only, no path).
- Choose a conflict policy. Save.
Every option explained
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
- 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