Batch Renamer
Renames selected scene GameObjects and/or selected project assets with a prefix, suffix, find/replace, regex replace, or numbered Base_001 scheme. Live preview before apply. Optional recurse, case pass, and number padding.
Editor-only. Unity 2021.3+. Lives in Rivet.Editor (includePlatforms: Editor). No extra packages. Does not copy Anvil types.
Editor window
ArTchie / Rivet / Batch Renamer
| Control | What it does |
|---|---|
| Mode | Prefix, Suffix, Replace, Regex, Number |
| Fields | Prefix/suffix string; find + replace-with; regex pattern + replace-with; optional base name + start number (default 1) |
| Case-insensitive | Replace mode only. Find matches ignore case. |
| Padding | Number mode only. Digit width (default 3 → _001). Range 0–8 (0 = no pad). |
| Include children / folder contents | Scene: also rename descendants of selected transforms (inactive included). Assets: if a folder is selected, include assets inside it. Nested folders found while walking are not renamed unless those folders are also selected. The selected folder itself is a rename target because it is selected. |
| Case | Extra pass after the main rename: None, Lower, Upper, Title. Title capitalizes letters after non-letters (hello_world → Hello_World). |
| Apply | Scene objects: Undo.RecordObject + GameObject.name. Assets: AssetDatabase.RenameAsset in the same folder (GUID unchanged). applied is true only when at least one name actually changed. |
| Ping | Per preview row. Pings the scene object or project asset. |
| Copy JSON | Clipboard report of the last apply, or the current live preview if you have not applied yet. |
| Write report | Writes <project>/RivetReports/batch-renamer.json (creates the folder if needed). |
The preview list updates from the current Hierarchy / Project selection. Skips Packages/ and Library/. Persistent Project-window objects are treated as assets; in-scene instances are treated as scene objects (never both for the same pick).
Batchmode (CI)
Unity -batchmode -nographics -quit -projectPath <proj> -executeMethod Rivet.BatchRenamer.RunBatch -rivet-mode prefix -rivet-value Pre_ -rivet-out <file.json> -rivet-fail
Batch is a dry-run unless -rivet-apply is present. Window Apply still applies.
| Arg | Meaning |
|---|---|
-rivet-mode prefix|suffix|replace|regex|number |
Required. |
-rivet-value <text> |
Prefix, suffix, find string, regex pattern, or optional number base name. |
-rivet-replace-with <text> |
Replacement for replace / regex. |
-rivet-selection scene|assets|both |
Default both. |
-rivet-recurse |
Include scene descendants and assets inside selected / -rivet-path folders. |
-rivet-case none|lower|upper|title |
Extra pass after the main rename. Default none. |
-rivet-pad <n> |
Number-mode digit width. Default 3. Clamped 0–8. |
-rivet-ignore-case |
Replace mode: case-insensitive find. |
-rivet-path <Assets/...> |
Repeatable. Target a project asset with no editor selection (assets only). Also accepts -rivet-path=Assets/Foo.prefab. |
-rivet-apply |
Actually rename. Without this flag, batch writes a dry-run preview (applied: false). |
-rivet-out <file.json> |
Output path. Default: <project>/RivetReports/batch-renamer.json |
-rivet-fail |
Exit code 1 if any item has ok: false. |
If nothing is selected and no -rivet-path is given, the tool scans nothing and writes an empty preview (applied: false, count: 0). Missing / unknown -rivet-mode, unknown -rivet-case, invalid -rivet-pad, or an invalid regex exits 1 in batch.
Missing -rivet-path targets are reported as rows with ok: false.
RunBatch only calls EditorApplication.Exit when Application.isBatchMode is true. It logs applied=, count=, and the output path.
Also accepts -rivet-mode=prefix / -rivet-out=file.json.
JSON
{
"tool": "BatchRenamer",
"generatedUtc": "2026-08-18T02:00:00Z",
"applied": true,
"mode": "prefix",
"recurse": false,
"case": "none",
"pad": 3,
"count": 1,
"errors": 0,
"items": [
{
"from": "Cube",
"to": "Pre_Cube",
"kind": "scene",
"ok": true,
"error": ""
}
]
}
kind is scene or asset. errors is the number of items with ok: false. applied is true only when names actually changed (dry-run and no-op renames stay false). Number mode writes Base_001, Base_002, … with -rivet-pad / Padding (default 000). If -rivet-value / the base-name field is empty, each item uses its current name as the base.
Notes
- Never moves files. Asset renames stay in the same folder so
.metaGUIDs stay put. Apply resolves the live path from GUID so a parent-folder rename in the same batch does not strand children. - With recurse, contained assets of a selected folder are included. Nested folders found only by walking are skipped unless those folders are also selected. A selected folder is itself a rename target. Turn recurse off to rename a folder without touching its contents.
- Destination collisions (two selected assets mapping to the same path, or a path that already exists) mark that row
ok: falseand skip it. - Illegal filename characters (
/ \ : * ? " < > |) are rejected for assets. - Empty projects, an empty selection, and a missing
RivetReportsfolder are fine. - Does not touch runtime player code.
Source in the box: Assets/ArTchie Studios/ArTchie-Suite/com.artchie.rivet/Documentation/BatchRenamer.md