# How to Batch Rename Files in ComfortFiles

ComfortFiles is a Windows Explorer-style file manager for macOS.

Select several files, right-click, and choose **Rename…** — ComfortFiles opens a batch rename dialog with a live preview. Pick a pattern, watch the new names update as you type, and apply them all at once. One <kbd>⌘Z</kbd> undoes the whole batch.

<video class="howto-shot" autoplay muted loop playsinline poster="/media/how-to/batch-rename-poster.png" width="962" height="790">
  <source src="/media/how-to/batch-rename.mp4" type="video/mp4" />
</video>

## Opening the dialog

1. Select two or more files or folders.
2. Right-click and choose **Rename…** (or press <kbd>F2</kbd>).
3. The batch rename dialog opens, listing every selected item with its **Original** and **New name** side by side.

Rename a single item and you get the plain inline rename instead — the batch dialog is only for multi-selection.

## The four patterns

Pick a pattern from the tabs at the top. The preview updates live, so you always see the result before applying.

- **Find & Replace** — replace text in every name. Type what to find and what to replace it with; tick **Match case** if case matters.
- **Add Text** — add a **prefix**, a **suffix**, or both. The suffix goes before the extension, so `report.pdf` with suffix `-final` becomes `report-final.pdf`.
- **Number** — number the files sequentially. Set a base **Name**, a **Start** value, and how many **Digits** to zero-pad to. With a name it produces `Photo (001)`, `Photo (002)`, …; leave the name empty and you get just `001`, `002`, ….
- **Extension** — change the extension on all of them at once, e.g. `txt` → `md`.

## Preview and conflicts

The preview flags problems before you commit: if a pattern would produce two identical names, or an invalid one, those rows are marked and the **Rename** button stays disabled until you fix the pattern. Nothing is written until every name is valid and unique.

## Undo

Renamed the wrong set, or picked the wrong pattern? Press <kbd>⌘Z</kbd> — the entire batch reverts in one step ("Undo Rename N Items"). Redo with <kbd>⇧⌘Z</kbd>.

## Related

- Just one file? Press <kbd>F2</kbd> to rename it inline — [undo](/how-to/undo) reverts that too.
- New to renaming files on the Mac and how it differs from Windows? [Batch renaming files on a Mac](/guides/batch-rename-on-mac).
