TidyBatch

Can you undo a bulk rename?

Sometimes, if you act immediately. Often, no. Here's what to try right now, in order, and how to make sure the next rename can always be reversed.

First: stop. Don't rename, move or delete anything else in that folder. Most undo options only cover the last action.

1. Windows File Explorer: Ctrl+Z, right now

If the rename was done in File Explorer (or with PowerToys PowerRename, which renames through Explorer) and you haven't done anything else since, press Ctrl+Z in Explorer, or right-click and choose Undo Rename. Microsoft's own PowerRename documentation says this undoes the whole batch. The catch: only the most recent file operation can be undone. If you've done anything since, it's probably too late.

2. macOS Finder: Edit → Undo

Right after a Finder rename, Edit → Undo (⌘+Z) reverses it. Again, it only works while it's still the last action.

3. Lightroom Classic: rename back from metadata

Lightroom keeps each photo's original filename in its metadata. You can't "undo" the batch, but you can rename again with a template that uses the Original Filename token, as described in the Adobe community.

4. Your rename tool's own undo

Dedicated tools differ. Some keep a history you can revert; many only undo the last batch while the program is still open; plenty have no undo at all. Check the tool's menu before closing it.

5. Backups

A backup made before the rename has the old names: Windows File History, macOS Time Machine, or a copy on another drive. Restoring brings back the old names, but also the old contents, so be careful if you edited files since.

If files were overwritten

If two files got the same name and one replaced the other, that's no longer a naming problem: the data itself is gone from that folder. Only backups or file-recovery tools can help, and on SSDs recovery is unlikely. The only real fix is prevention.

Make every future rename undoable

  1. Preview first: PowerShell -WhatIf, rename -n, or a tool with a dry run.
  2. Never overwrite: mv -n, or a tool that resolves name clashes instead of replacing files.
  3. Keep a journal: a record of old name → new name that survives closing the program.

TidyBatch (free, open source) does all three by default. Every applied run writes a journal inside the folder, so this works hours or days later:

tidybatch rename ./photos -t "holiday_{n:03}{ext}" --apply
# ...days later...
tidybatch undo ./photos      # every file goes back to its original name

Other open-source CLIs with undo history include rnm and renamex.

Next: how to bulk rename files safely →