Skip to content

These docs are for MetaTana 2.0, coming soon

On this page

Recover From A Bad Rename

You ran a rename (by hand, with a bulk action, or as part of an organize) and the result is wrong. The wrong files moved into the wrong folder, an episode got the wrong number, or a season got flattened that shouldn't have. MetaTana records every rename with the steps needed to reverse it, so you can usually undo it without restoring from backup.

When to use this Use this recipe when a rename finished but the resulting file name, folder, or grouping is wrong. For renames that failed, the original file is untouched; open the failed Activity row and read the error instead.

Step 1: Open Activity

Select Activity in the sidebar. The timeline is grouped by day, newest first, and each row offers only the actions that apply to it, such as Undo, Retry, or Open.

Step 2: Find the rename row

Set Show to Renames, or search for the title or file name (or scroll to the time you know the rename ran). Open the row to see what the rename did:

  • The title it moved (show, movie, or episode)
  • The original file name
  • The new file name
  • How many NFO, artwork, and subtitle files moved with it
  • Whether Undo is available

If the row has Undo, go on to Step 3. If it has none, skip to Step 5.

If an Autopilot scan moved the files, the scan's row offers Undo this scan's moves…, which previews every file and where it goes back to, then moves them back together.

Step 3: Select Undo

Undo reverses the rename:

  1. The file moves backThe renamed file goes back to its original path. Sidecars that moved with it move back too.
  2. The library followsMetaTana points the title at the restored path.
  3. Activity records itA new row lists the undo with the same details, so you can see both steps.

After Undo finishes, open the title's page in Library and check its file. The path should match the original file name and folder.

Undo doesn't touch downstream servers If Plex, Jellyfin, Kodi, or Emby already picked up the renamed file, those servers still know the renamed path. After the undo, refresh the server's library (the server card's menu on Sync) so it finds the file again. See Troubleshooting: playback client can't see files.

Step 4: Verify in Activity and Library health

The undo's row in Activity confirms the file moved and shows where it is now. Run deep check in Settings › Maintenance › Library health should find no empty folders or ghost entries for the title. If it does, the undo didn't fully match disk and database (rare); use Rescan all files on the folder's menu on the Folders page.

Undo a whole bulk rename or organize

A bulk rename or organize is one batch. You can undo the whole batch instead of one file at a time:

  • Right after the run: the Bulk Rename and Organize results show Undo this batch and View in Rename History, which opens the batch in Activity. If part of a bulk rename failed, the results list every file, so you can see which ones moved.
  • Later: open Activity and set Show to Renames. Rows are grouped by batch, and each batch has Undo all. The single-file Undo on each row still works.

Undo all restores the batch newest first. A file that has moved again since the batch ran is skipped and listed as a conflict, and a sidecar restore stops rather than overwriting a file that is already there. Nothing gets overwritten; fix the skipped files by hand or with a single-row Undo.

Undo an NFO or artwork replacement

A scrape, rewrite, or Autopilot run that replaced NFO or artwork files can be undone as well. MetaTana keeps each replaced file in one hidden .metatana-trash folder at the root of the library folder. Undo puts the files back and removes folders it left empty. Use Undo on the scrape toast, or on the operation in Activity. If any file changed after MetaTana wrote it, Undo changes nothing and tells you which file changed. See Reference: file layout.

Step 5: When undo isn't available

Undo is not always available. It is not offered for a rename that failed or for an undo row, and it can stop when the rename crossed a destination that MetaTana couldn't track. Rename Undo does not expire. Only the NFO and artwork replacements above depend on the recoverable trash, which keeps files for 30 days by default. When Undo is not available, recover by hand:

  1. Read the rename rowEven when Undo is gone, the row still records the original file name and path. Note both.
  2. Move the file back yourselfUse Finder, Explorer, or a terminal to move the file back to its original path.
  3. Relink the titleOpen the title's page in Library and select ⋯ › Relink file…. Pick the restored path, and MetaTana points the title at it.
  4. Rewrite the NFO⋯ › Write NFO on the title's page writes the NFO at the restored path from the current metadata.

Step 6: Prevent the next bad rename

A few habits that catch wrong renames earlier:

Back up before bulk renames Before you organize hundreds of titles at once, select Back up now in Settings › Maintenance › Backups. Recipes: back up your library. A database restore puts library records back, not files, so use Undo for the file moves.
Lock the identity first Renames use the current identity. If the identity is wrong, the rename is wrong. Fix and lock the identity before any rename; see Recipes: lock fields.
Preview before applying Naming on the Folders page has ⋯ › Preview renames…, which shows each file's current and new name without changing anything. Read the preview, then apply.
Watch episode order first A rename on a show with the wrong episode order puts the wrong numbers in the file names. Fix the order before renaming; see Recipes: reorder episodes.

What success looks like

  • Activity shows the undo (or the relink) as finished
  • The title's page shows the original path
  • Library health finds no ghost entries for the title
  • Your media servers show the restored path after their next library refresh

Going deeper