DocsFileBatch Rename Files

Batch Rename Command Reference (Patterns & Dry Run)

Desktop ModeBrowser ModeRunMacro 3.5+

Batch Rename Files renames many files by find-replace, prefix/suffix, sequence, or a CSV/Excel mapping, with a safe preview mode.

Dialog & quick setup

RunMacro Batch Rename Files command configuration dialog showing parameter fields
Configuration dialog and parameter fields for the Batch Rename Files command in RunMacro.
  1. Add a File › Batch Rename Files command.
  2. Enter the folder and a pattern (e.g. *.jpg).
  3. Choose a rename mode: find-replace, prefix/suffix, sequence, or mapping.
  4. Fill the matching parameters (find/replace text, prefix, sequence pattern, or mapping file + source/destination columns).
  5. Run in preview to check the plan variable; when it looks right, turn preview off and run for real. Save.

Options reference

Folder + Pattern

The folder and a glob pattern selecting files to rename. Can recurse.

Rename mode

find_replace, prefix_suffix, sequence, or mapping.

Find / Replace

Text to find and its replacement in the name stem (find-replace mode).

Prefix / Suffix

Text added before/after the name stem (prefix/suffix mode).

Sequence pattern + Start number

e.g. Photo_{counter:03} yields Photo_001, Photo_002... (sequence mode).

Mapping file + Source/Dest columns + Sheet

A CSV/Excel file with old→new name pairs; specify column names and sheet (mapping mode).

Preview (dry run)

If on, only plans and writes to the preview variable without renaming.

Conflict policy

error (stop on any invalid/collision) or skip (drop invalid items).

Preview variable / Count variable

Variable holding the JSON plan (default batch_rename_preview) and the ready count (batch_rename_count).

Modes & when to use

Desktop Mode

Operates on the local file system.

Browser Mode

Best for

  • Standardize many image/document names.
  • Number files by a pattern.
  • Rename by an old→new list in Excel/CSV.

Use an alternative when

  • You are renaming a single file — use Rename File or Folder.
Before you run
  • The folder exists; mapping mode needs a valid CSV/Excel file.

Example workflow

Example: renumber all photos

  1. Batch Rename: images folder, pattern *.jpg, mode = sequence, pattern IMG_{counter:04}, start 1.
  2. Run preview, check {batch_rename_preview}; if good, turn preview off and run.
Expected result: In preview: the preview variable holds the plan. When applied: files are renamed per the plan.

Tips & limitations

Always run the preview before applying. If two files map to the same destination, the command reports a collision.
Mapping mode reads .csv, .xlsx, or .xlsm; the source and destination column names must match.
  • Names invalid on Windows are flagged.
  • Multiple files mapping to one destination cause a collision.

Applies to RunMacro 3.5+ · Desktop Mode & Browser Mode · Windows 10/11

RunMacro robot

Robots do the work. Your time is yours.

Create a robot in minutes, no coding needed. Reliable execution, remote management, transparent costs — and you always stay in control.