All tools

Conditional replace

Replace text around a target in file names

Conditional replacement helps when the part you want to change is defined by its position around a marker. It is useful for names that share separators, labels, or structured fragments.

Best for

Use this when plain find-and-replace is too broad and the replacement should only affect text before or after a target marker.

Rename examples

Replace prefix before marker

photo_20240517.jpg

image_20240517.jpg

Replace middle label

report-final-v3.docx

report-approved-v3.docx

Change anchored segment

clientA_invoice_001.pdf

clientB_invoice_001.pdf

Common use cases

  • Change text before or after separators such as hyphens and underscores.
  • Replace only the first, last, or all matching anchored segments.
  • Update structured labels without touching the rest of the file name.

How to use it

  1. 1Choose the conditional replace rule.
  2. 2Set the target marker and the range to replace.
  3. 3Review the preview to confirm only the intended segment changes.

FAQ

How is this different from normal replacement?

Normal replacement changes matching text directly. Conditional replacement first finds an anchor, then changes a defined area around it.

Can I replace text before a character?

Yes. You can target text before or after a marker and control how many characters are affected.

Related tools

All tools

Apply this rule locally

Renamio runs on Windows and macOS, previews every rename, and keeps rename history for safer batches.

Download Renamio