Skip to content
On this page

Naming And Organizing

Renaming and organizing change files on disk, so do them after the metadata is reviewed.

Renames use the current identity A rename based on a wrong identity moves the file under the wrong folder. Always fix identity first, then rename. If you renamed before fixing, see Recover from a bad rename.

Movie Versions And Parts

The Emby and Jellyfin presets keep editions of one movie in a shared movie folder with a different filename for each version. They keep the movie title and year before the version label. Your saved custom patterns stay unchanged. Stacked CD1/CD2 movie parts share that folder's poster and fanart; unrelated movies in one folder keep separate artwork.

Rename Files: Quick How-To

  1. Make the folder writableMetaTana can only rename files it can write. In Docker, mount the media folder read/write (remove :ro) and make sure the PUID/PGID user can write to it. A read-only folder still scans; Folders shows Read only with "Scans work, file changes are blocked", and renames stay blocked.
  2. Optional: choose file outputTo also write NFO and artwork for the folder, pick your player under For your player when you add the folder (the default, None, writes no sidecar files), or later turn on Write NFO files in the folder's Edit folder drawer on Folders. Settings › Files › Media player preset sets the default for every folder.
  3. Set the patternOpen Settings › Files › Naming, then Edit next to Movies, Shows, or Anime. Start from a preset (Simple, Plex, Full, Kodi, or Anime Absolute), or edit Raw pattern. The Preview card shows the result for sample titles or My Library. If your saved patterns don't load, the page shows Couldn’t load your naming patterns with Retry, and editing stays paused so your saved patterns aren't replaced. Edits in the Naming drawer are kept only when you select Save; Cancel, Esc or closing the drawer keeps the saved pattern.
  4. Run the renameIn Library, select the items, then choose More › Other actions › Rename files in place… in the selection toolbar. The Bulk Rename dialog previews every change; uncheck anything you want to skip, then select Rename N Files. A title Rename leaves where it is shows under No change with the reason.
  5. Undo if neededThe results show Undo this batch to reverse the whole run. Later, open Activity with Show: Renames: renames are grouped by batch with Undo all, and each row has its own Undo. Associated NFO, artwork, and subtitle files move back too.

Pattern syntax

  • A token is written ${token}, for example ${title}, ${year}, ${showTitle}, ${seasonNr2}, ${episodeNr2}, ${episodeTitle}, ${resolution}, or ${ext}. The Tokens panel lists them all.
  • / starts a new folder level.
  • Formatters follow a ;: ${title;upper}, or ${genres;first(2);join(, )}. truncate(n) shortens a value to at most n characters, cutting at a word break where it can: ${edition;truncate(32)}.
  • {?token}…{/token} outputs its contents only when that token has a value.
  • A retired token renders as empty text, and the rename preview shows "This token is no longer supported". Remove it from the pattern.

The default movie pattern:

${title} (${year})/${title} (${year}).${ext}

turns a file into Big Buck Bunny (2008)/Big Buck Bunny (2008).mkv.

Show folders include the year

Show folders carry the show's first-air year through the ${showYear} token. The default TV and anime pattern is:

${showTitle}{?showYear} (${showYear}){/showYear}/Season ${seasonNr2}/${showTitle} - S${seasonNr2}E${episodeNr2}{?episodeTitle} - ${episodeTitle}{/episodeTitle}.${ext}

so an episode lands in Doctor Who (2005)/Season 01/. The Kodi, Plex, Emby, and Jellyfin presets (Settings › Files › Media player preset and For your player) and every naming preset in Settings › Files › Naming (Simple, Plex, Full, Kodi, Anime Absolute) do the same. When the year is unknown, the folder is the show title alone.

  • Two shows never share a folder. Organize skips a look-alike folder that holds another show and uses the folder with the year instead. If no other folder is left, the move waits with "another show with this name already uses that folder". Library Rename files in place… refuses the same move. Shows are told apart by their TMDb, TVDB or TVmaze ID, so this works for a show matched on TVmaze alone too.
  • Existing folders stay put. A show already in Doctor Who/ is not moved to Doctor Who (2005)/ automatically, even in a folder with Autopilot renames approved. Run Rename files in place… in Library to move it; the preview shows the new folder names first.
  • Saved patterns are not changed. A custom pattern you saved, or a yearless preset you picked earlier, keeps its folders. Pick a preset again to get the year.
  • Show files leave with the last episode. The show's tvshow.nfo, art and actor photos move with the last episode that leaves the folder, so renaming a whole show moves everything, and organizing one episode leaves them with the rest of the show. This holds for a show whose episodes sit loose in one folder too. A subtitle named after no episode stays where it is. A season folder's own files, such as season.nfo and its poster, go with the last episode that leaves that season folder, and Undo brings them back.
  • Movie folder files leave with the last copy. When two copies of a movie share a folder, each copy takes the files named after it, and the folder's poster.jpg, fanart and actor photos move with the last copy that leaves.
  • Copies keep their own files. A second copy of a movie organized into the first copy's folder gets its own name, such as Dune - Part Two (2024) (2).mkv, so its NFO and subtitles stay its own. Its poster, fanart and actor photos replace the first copy's, which go to MetaTana's trash. Undo puts them back. Rename files in place… does the same for a copy renamed into the other copy's folder, and its Undo in Activity › Renames puts both copies' images back.
  • One folder per show. Organize puts every episode of a show in the same folder, named from the show's title and first-air year, even when some file names carry no year.
  • Episode editions keep their name. A Director's Cut of an episode is organized and renamed as The Legend of the Blue Sea - S01E01 - Director's Cut.mkv, so the broadcast episode keeps the plain S01E01 name.

Multi-episode files

MetaTana keeps every episode of a file like Show.S01E01-E03.mkv, so rename and organize name the whole range. A pattern that names only the first episode, including the default TV pattern, gets the range added after the episode number:

Pattern piece Result for episodes 1 to 3
S${seasonNr2}E${episodeNr2} (default) S01E01-E03
s${seasonNr2}e${episodeNr2} s01e01-e03
${seasonNr}x${episodeNr2} 1x01-03
Episode ${episodeNr} Episode 1-3

A pattern that already uses ${episodeNrEnd} or ${episodeNrEnd2} (last episode in the range) is left as you wrote it, so S${seasonNr2}E${episodeNr2}E${episodeNrEnd2} gives S01E01E03. Organize without a pattern names the file Show - S01E01-E03. Organize holds a multi-episode file back only when a rescan is needed to confirm its episodes.

Daily shows

A file named by air date can be organized once the show's provider episode list has exactly one episode for that date. Organize names it with that episode's season and number. When several episodes aired that day, the file waits until you pick one under Choose the episode (see Manage a TV show). Autopilot renames date-named files too, but only when exactly one episode aired that day and the provider's air date for that episode matches the file's date.

Plex editions

Plex reads a movie's edition (Director's Cut, Extended, and so on) from an {edition-Name} tag in the folder and file name. When you pick Plex under For your player when adding a folder, or the Plex preset in Settings › Files › Media player preset or Naming, the movie pattern adds that tag:

${title} (${year}){?edition} {edition-${edition}}{/edition}/${title} (${year}){?edition} {edition-${edition}}{/edition}.${ext}

A movie with an edition becomes Alien (1979) {edition-Director's Cut}/Alien (1979) {edition-Director's Cut}.mkv. A movie without one keeps the plain Alien (1979)/Alien (1979).mkv. To get the same result from another pattern, add the {?edition} {edition-${edition}}{/edition} block after the year.

The Plex preset caps the edition name at 32 characters, because Plex ignores longer ones. Its tag is {?edition} {edition-${edition;truncate(32)}}{/edition}. A pattern saved by an earlier Plex preset is upgraded automatically; patterns you wrote yourself are not changed. In Settings › Files › Naming, a movie pattern without the edition tag is left alone, because it is also the Kodi preset and the default. Pick Plex again there to add the tag.

A scan reads the tag back: Blade Runner (1982) {edition-Final Cut}.mkv is the movie Blade Runner (1982), Final Cut edition, and the tag is not part of the title. So a library renamed with the Plex preset matches the same titles and editions on the next scan.

Filename characters in Settings › Files › Naming apply after the pattern: Spaces, Colons, ASCII only, and Lowercase extensions.

Renaming A Drop

A folder you drop is renamed only when you press Rename on its page, and only the files it lists. Rename sorts the files into Movies/, TV Shows/ and Anime/ inside the folder you dropped (a folder already named for one kind gets no extra level, and a kind the dropped folder already has a folder for, such as TV or Films, goes into that folder), using MetaTana's naming for None or your player's naming when you pick Jellyfin, Kodi, Plex or Emby. A drop into a Library folder you already have follows that folder's naming. A file with an edition gets it in its name, in the form Alien (1979) - Director's Cut.mkv, so two editions of one movie can both be kept. Pressing Rename never sets a folder to rename on its own; Done asks about new files separately. See Drop A Folder Or Files.

Autopilot Renames Wait In The Inbox

You can let Autopilot tidy a folder for you. Pick Tidy into Movies and TV folders under File handling when you add the folder, or turn on Tidy into Movies and TV folders in the folder's Edit folder drawer on Folders. Leave files where they are, the default, means Autopilot proposes no renames for that folder. A folder that already sits in a TV Shows, Movies or Anime folder (TV Shows/To be sorted) gets no second one for that kind: its shows go straight into it, while its movies still go into Movies.

Tidy keeps your own type folders. A file that already sits under a folder for its kind, such as Movies, Films, TV, TV Shows, Series, or Anime, stays in that folder along with any grouping folders inside it (Movies/Action/Alien (1979)/). Files outside a type folder go into your own type folder at the top of the folder when you have one (TV, Films, Series), else into new Movies, TV Shows and Anime folders. A new episode joins its show's existing folder there.

A file counts as already organized only when its folders fit the pattern and its name already matches it. A dotted name in the right folder, such as Show (2005)/Season 01/Show.S01E01.mkv, gets the pattern's name inside the folders you already have (Season 1 stays Season 1). A clean name in another style, such as Lost - 6x03 - What Kate Does.mkv, stays as it is. Titles identified from an NFO that came with them are renamed the same way, and the NFO moves with the video unchanged. The folder's Rename files in this folder decides what happens: Always renames, Ask first puts the rename in the Inbox, Never leaves the file.

This choice on each folder is the only switch for renames; there is no global organize setting.

In a folder whose Rename files in this folder is Ask first, Autopilot moves nothing until you approve. Its rename proposals from every run wait in the Inbox under Renames, and Home's Inbox card has a Rename row. Select Review renames to see how many files change on disk, how many move to a different folder, and how many lose words from the filename, then select Rename N files. Approving renames, one at a time or all at once, approves only those renames and never changes the folder's rename mode. To let Autopilot rename new files in a folder without asking, set Rename files in this folder to Always in its Edit folder drawer; before each move it checks the file again and holds any file that is still changing. Setting a folder to Never, or turning Tidy into Movies and TV folders off, stops renames there, and renames already waiting for that folder leave the Inbox right away. Every rename is saved in Activity under Show: Renames, with Undo. See Inbox.

A rename held because the file was still copying or playing comes back for approval once the wait is over, in folders that still ask. If the file is gone by then, the held rename is dropped and the next scan proposes a new one.

When a rename moves the last file out of a folder, MetaTana removes that folder and any parent folders it leaves empty. Sidecar folders that the move emptied, such as .actors or extrafanart, are removed first, so they do not keep the old folder behind. Undo does the same for the folder the rename created. A folder counts as empty when it holds nothing, or only system files such as .DS_Store or Thumbs.db. A rename, Organize and a drop's Rename move those system files to MetaTana's trash, and Undo (or Undo this drop) puts them back. Library folders, and folders with anything else in them, are never removed.

Undo also removes the empty folders it leaves behind in a destination or an output folder, such as the Alien (1979)/ folder an Organize made there.

If MetaTana stops in the middle of a move, for example after a crash or a power cut, it finishes or undoes that move the next time it starts. A movie and its NFO, artwork, and trailer end up together, either all in the new folder or all back where they were.

If you renamed a file outside MetaTana and a scan picked it up under the new name, a rename back to the old name completes instead of failing. When the old record has the same file size, MetaTana treats both as the same file and keeps its watch state.

Dry run (Preview only (no file changes) in Settings › General › Scanning) also holds back renames that were already approved: Autopilot proposes every move and rename for you to approve in the Inbox instead of moving files.

Rename Inputs

Rename patterns can use fields such as:

  • title
  • year
  • season and episode
  • absolute episode number
  • episode title
  • edition or version
  • provider IDs
  • people fields
  • movie set fields
  • language or technical hints

Use patterns that match how your playback clients expect to scan local metadata.

  • A special with no title of its own is named S00E01.mkv, not with the show's title.
  • A title that starts with a dot loses the dot (45 (2006)/), because dot-names are hidden from scans and media servers.
  • An existing folder keeps its spelling, including macOS-style accents.
  • A Rescrape with Rename files keeps a file at the top of a library folder inside that folder.
  • A Rescrape of a whole show with Rename files renames every episode file once the show's episode titles are in, as one rename you can undo. The review shows what moves with them before you apply.

Preview Before Execute

The rename preview shows:

  • current file path
  • proposed target path
  • sidecars that move with the media
  • conflicts
  • invalid or missing tokens
  • whether a rename is skipped

Do not run broad rename batches when the preview still contains wrong identities.

From MetaTana 2.2, Rename, Organize, a drop's Rename, Rescrape and Autopilot leave alone a title MetaTana never identified (no TMDb, TVDB, IMDb, TVmaze, Trakt, AniList or MyAnimeList ID), however well its file name matched. The preview says "Not identified yet: scrape it or pick its match first".

MetaTana never renames or deletes one file from inside BDMV or VIDEO_TS as though it were a standalone movie. The complete disc folder must stay together. One disc of a set (a Disc 1 or Movie - Disc 1 folder) is not renamed or moved, because every disc in the set would go to the same folder; rename the set's folder yourself. A camcorder disc (AVCHD) is never renamed or moved, so its folders stay as the camera wrote them. Organize and Rename move that folder only within the same drive, and never copy a disc folder to another drive. A disc folder move to another drive is refused before anything starts, with This disc folder is on a different drive from its destination. Move it within the same drive, or use Arrivals to publish it to another drive. Arrivals can file a complete disc folder to a destination on another drive: it copies the whole folder into a hidden staging folder beside the destination, checks every file, moves it into place, and only then removes the source files that still match. If MetaTana stops partway, it finishes or discards the copy on the next start, and anything it cannot confirm waits for you with nothing deleted. Deleting the disc's control file directly and automatic Undo are not offered, because either could damage a disc folder or miss files that appeared later. Run a new whole-folder action instead. An unavailable library stops preview and execute before file work starts. A read-only library can still show a preview, but execute stays blocked until write access is restored.

Organize, Undo, Delete, and duplicate cleanup also work on drives without hard link support, such as exFAT or FAT USB drives and some SMB shares. MetaTana never replaces a file that is already at the destination.

Organize Destinations

Destinations are organized libraries. A destination can be used for movies, shows, anime, or other kinds of content.

Routing can use the folder, the type, tags, or your own rules. Keep routing simple until the library has clean metadata. Organize adds a Movies, TV or Anime folder inside a destination, unless the destination or a folder above it is already named for that kind: a show organized into TV Shows/To be sorted gets no TV/ folder of its own.

Destinations and routing rules are on Folders, in the Destinations and Advanced routing sections. The Naming section there shows your patterns with an example, and Edit naming opens Settings › Files › Naming. A library folder can also use its own pattern: set Naming to Custom in the folder's Edit folder drawer, and choose Rename files in this folder: Always, Ask first, or Never.

Rollback Thinking

Before a large move:

  1. Back up the databaseSelect Back up now in Settings › Maintenance › Backups, or copy the app data directory. See Back up your library. A database backup restores library records; Undo moves the files back.
  2. Test with a small batchPick one folder or a small filter. Run the rename. Check the result before doing the rest.
  3. Check Activity for failuresEach rename row shows what it did and the outcome. Failed rows tell you what stopped.
  4. Confirm moved files and sidecars exist at the new pathsThe sidecar count in the Activity row should match what landed on disk.
  5. Confirm Library points to the new pathsCheck the Files section on the title's page. If it still shows the old path, the database didn't follow the move.

Check both the old and new paths, not only that the rename reported success.