TV shows guide
How to Rename TV Show Episodes in Bulk (S01E01 Naming That Works Everywhere)
Your media server doesn't care what a file is called, as long as it can find three things in the name: the show, the season and the episode. Get those right and Plex, Jellyfin, Emby and Kodi pull in titles, artwork and summaries on their own. Get them wrong and you end up with unmatched files, a season full of duplicates, or episode titles that don't match what actually plays.
This guide covers the naming rules that work in every app, the edge cases that break most libraries (specials, double episodes, daily shows, DVD order) and the ways to rename a whole season at once, by hand or with a tool.
The SxxExx convention, and why it works everywhere
The standard way to name an episode is the show title followed by a season and episode code: S plus a two-digit season number, then E plus a two-digit episode number. Season 1, episode 1 is S01E01; season 5, episode 14 is S05E14.
Breaking Bad (2008) - S01E01 - Pilot.mkv
Breaking Bad (2008) - S05E14 - Ozymandias.mkvIt works because every media server, every download manager (Sonarr, for example) and every metadata scraper looks for that exact pattern first. It is also unambiguous: S01E10 can only mean season 1, episode 10, while a name like Breaking Bad 110.mkv could be episode 110 or season 1, episode 10.
- Pad with zeros. Write
S01E05, notS1E5. Most apps read both, but padded numbers sort correctly in every file browser. A season with more than 99 episodes uses three digits:S01E101. - Case and separators don't matter.
s01e01andS01E01, with dots, dashes or spaces around them, all parse. Pick one style and keep it across the library. - The episode title is optional. Servers take the title from TMDB or TheTVDB, not from your file name. Adding it just makes the folder easier for you to read.
- Prefer `S01E01` over `1x01`. The older
1x01style is still understood by some tools (Kodi, for one), butS01E01is the form they all agree on. - Keep characters legal. Windows forbids
< > : " / \ | ? *in file names, so a title like Star Trek: Discovery becomesStar Trek - DiscoveryorStar Trek Discoveryon disk. The match still works.
| Server | Season folder | Episode file |
|---|---|---|
| Plex | Season 01 | Breaking Bad (2008) - s01e01 - Pilot.mkv |
| Jellyfin | Season 01 | Breaking Bad S01E01.mkv |
| Emby | Season 01 | Breaking Bad - S01E01.mkv |
| Kodi | Season 1 or Season 01 | Breaking Bad S01E01.mkv |
Each app has its quirks, covered in the Plex naming guide, the Jellyfin naming guide, the Emby naming guide and the Kodi naming guide. The short version: files named Show - S01E01 - Title inside season folders are read correctly by all four.
Folder structure: Show (Year)/Season 01
The file name tells the server which episode it is; the folders tell it which show. Use one folder per show, named with the title and the year the show first aired, then one folder per season inside it.
TV Shows/
├── Breaking Bad (2008)/
│ ├── Season 01/
│ │ ├── Breaking Bad (2008) - S01E01 - Pilot.mkv
│ │ └── Breaking Bad (2008) - S01E02.mkv
│ └── Season 02/
│ └── Breaking Bad (2008) - S02E01 - Seven Thirty-Seven.mkv
└── Doctor Who (2005)/
└── Season 01/
└── Doctor Who (2005) - S01E01 - Rose.mkv- The year separates remakes and reboots.
Doctor Who (1963)andDoctor Who (2005)are different entries in TMDB and TheTVDB, and so areBattlestar Galactica (1978)andBattlestar Galactica (2004). Without the year, the server guesses. - Write `Season 01` in English, even for a show in another language. Don't shorten it to
S01, and don't leave loose episodes next to the season folders. - A miniseries is still a season.
Chernobyl (2019)/Season 01/Chernobyl (2019) - S01E01.mkvis correct. - Keep TV shows and movies in separate libraries. A movie inside the TV folder confuses the scanner, and the other way around.
Pin the exact show with a database ID
When a title is ambiguous, add the show's database ID to the folder name. Plex reads {tmdb-1396}, {tvdb-81189} or {imdb-tt0903747} in curly braces; Jellyfin reads [tmdbid-1396] or [tvdbid-81189] in square brackets. Both IDs below point to Breaking Bad.
Breaking Bad (2008) {tvdb-81189}/ (Plex)
Breaking Bad (2008) [tvdbid-81189]/ (Jellyfin)Specials and Season 00
Christmas specials, mini-episodes, recap shows and unaired pilots belong to season 0. The folder is called Season 00 (Plex also accepts Specials), and the files are numbered S00E01, S00E02 and so on.
Doctor Who (2005)/
├── Season 00/
│ └── Doctor Who (2005) - S00E02 - The Christmas Invasion.mkv
├── Season 01/
└── Season 02/The number is not yours to choose: it has to match the special's number in the database your server uses. On TMDB, The Christmas Invasion is special number 2 because a short Children in Need scene is listed first. Number your specials in your own order and the server attaches the wrong title, summary and artwork.
TMDB and TheTVDB often number specials differently. Check the Season 0 list on the same database your server is set to use before you rename.
If something isn't listed as a special anywhere (a featurette, a blooper reel, a trailer), it's an extra, not an episode. Plex and Jellyfin both read extras folders such as Featurettes, Behind The Scenes or Deleted Scenes inside the show folder.
Multi-episode files (S01E01-E02)
Some releases put two episodes in a single file, typically a two-part premiere or finale. Name the file with the first and the last episode:
Lost (2004)/
└── Season 01/
├── Lost (2004) - S01E01-E02 - Pilot.mkv
└── Lost (2004) - S01E03 - Tabula Rasa.mkvS01E01-E02 is the form Plex documents, and Jellyfin, Emby and Kodi read it too. Kodi also accepts S01E01E02. Whatever you pick, use the same form everywhere in your library.
- Both episodes appear in the library, but they play the same file: choosing episode 2 starts at the beginning of episode 1.
- Watched status and resume position belong to the file, so marking one episode as watched can mark both.
- If the database lists the two-parter as a single feature-length episode, name it as one episode instead. Look at the episode list first.
For clean tracking, split the file. MKVToolNix can cut an MKV at a chapter or a timestamp without re-encoding, and Plex and Jellyfin both recommend one file per episode.
Daily and talk shows: name by air date
Talk shows, late-night shows and news programs don't have useful episode numbers. Databases list hundreds of episodes per year, and the reliable way to identify one is the date it aired. Put that date in the file name in YYYY-MM-DD form:
The Daily Show/
└── Season 2024/
├── The Daily Show - 2024-03-11.mkv
└── The Daily Show - 2024-03-12 - Guest Name.mkv- Plex accepts
YYYY-MM-DDandDD-MM-YYYY, with dashes, dots or spaces as separators. Use year first: it sorts in order and no one can mistake March 4 for April 3. - Kodi recognizes dates such as
2024.03.12or2024-03-12with its default matching rules. - Use the original air date as listed in the database. A file named after the day you downloaded or recorded it, often one day later, won't match.
- The season folder is secondary. Many talk shows are numbered by year in the databases, so a
Season 2024folder fits well, but the date in the file name is what identifies the episode. - In Sonarr, set the series type to Daily so it searches and names these shows by date instead of SxxExx.
Don't mix systems inside one show. If half the files use episode codes and half use dates, some will match and some won't, depending on how the database numbers that show.
Absolute numbering, in short
Some shows, mostly anime, are numbered straight through without seasons: One Piece episode 1071 is just episode 1071. That's absolute numbering. Western databases usually split those shows into seasons anyway, so the same episode also has a season and episode number there.
Plex can read absolute numbers when the show's episode ordering is set to TheTVDB (Absolute), and Kodi's scrapers offer a similar option. Everything else (AniList, fansub group tags, split cours, sequels listed as separate shows) is covered in our guide on how to rename anime.
TVDB vs TMDB, aired vs DVD order
This is the most common reason a correctly named library still shows the wrong titles. The same episode can carry different numbers depending on the database and on the order you pick, and the server simply trusts the numbers in your file names.
Aired order vs DVD order
Firefly is the textbook case. Fox broadcast its episodes out of order and held back the two-hour pilot, "Serenity", until near the end of the run. So in aired order "Serenity" sits near the end of the season, while in DVD order it's episode 1. If your files come from the DVDs and your server uses aired order, almost every title is wrong even though the files are perfectly named.
Other common differences: a streaming service re-cutting a show (Netflix turned Money Heist's original Spanish broadcast into more, shorter episodes), a double-length episode counted once on one site and twice on another, or one long season split in two.
TMDB vs TheTVDB
Plex's current TV agent uses TMDB aired order by default, while Sonarr uses TheTVDB numbering. Most of the time the two agree. When they don't, the fix is a setting, not a rename:
| App | Where to change the episode order |
|---|---|
| Plex | Whole library: Edit library > Advanced > Episode ordering. One show: Edit on the matched show > Advanced. Options include TMDB (Aired), TheTVDB (Aired), TheTVDB (DVD) and TheTVDB (Absolute). |
| Jellyfin | Edit Metadata on the series > Display order. Alternative orders such as DVD come from the metadata plugin you use (for example the TheTVDB plugin). |
| Emby | Edit Metadata on the series > Display order. |
| Kodi | The scraper settings of your TV source (Set content > Settings). The orders on offer depend on the scraper. |
| Sonarr | Always TheTVDB numbering. If Plex disagrees for a show, set that show to TheTVDB (Aired) in Plex. |
Decide which order your files follow before renaming. Open the show on TMDB or TheTVDB, compare three or four episode titles with what actually plays, then rename and set your server to the same order. After changing the order in Plex, refresh the show's metadata.
How to read a scene release name
Downloaded and ripped files often arrive with long release names. Every part has a meaning, but only two matter for naming: the show title and the episode code.
The.Expanse.S03E05.Triple.Point.1080p.AMZN.WEB-DL.DDP5.1.H.264-GROUP.mkv| Part | Meaning |
|---|---|
The.Expanse | Show title, with dots instead of spaces |
S03E05 | Season 3, episode 5 |
Triple.Point | Episode title (not always present) |
1080p | Resolution (also 720p, 2160p) |
AMZN.WEB-DL | Source: Amazon, downloaded from the stream (also WEBRip, HDTV, BluRay) |
DDP5.1 | Audio: Dolby Digital Plus 5.1 |
H.264 | Video codec (also x264, x265, HEVC, AV1) |
-GROUP | Release group, always after the last hyphen |
Tags like PROPER or REPACK mark a fixed re-release, and MULTi means several audio languages. A year after the title (Doctor.Who.2005.S01E01) tells versions of a show apart: keep that information for the show folder.
Other forms you'll meet: 1x05 (season 1, episode 5), S03E05E06 (two episodes), 2024.03.12 (a daily show) and Season 3 Episode 5 spelled out. Generic names like Episode 05.mkv carry no show title at all, so the show has to come from the folder name.
If you want to keep the quality, put it at the end in brackets: Breaking Bad (2008) - S01E01 - Pilot [1080p].mkv. Plex ignores text in brackets when matching.
Renaming episodes by hand: PowerRename, Finder and scripts
Windows: PowerRename (PowerToys)
PowerRename is a free Microsoft utility that comes with PowerToys. Select the episodes in File Explorer, right-click and choose Rename with PowerRename (depending on your PowerToys settings, it's in the main menu or under Show more options). Check Use regular expressions and Match all occurrences, set Apply to: Filename only, then enter:
Search for: .*?[Ss](\d{2})[Ee](\d{2}).*
Replace with: Breaking Bad (2008) - S$1E$2That turns Breaking.Bad.S01E03.720p.BluRay.x264-GROUP.mkv into Breaking Bad (2008) - S01E03.mkv, and the preview pane shows every result before you apply it. Ctrl+Z in File Explorer undoes the rename. For files with no episode code, check Enumerate items, search for ^.*$ and replace with Breaking Bad (2008) - S01E${start=1;padding=2}: the counter follows the order of the list, so sort it first.
The limits: PowerRename doesn't know episode titles, can't tell a two-parter from a normal file, and you need a different expression for every naming pattern in your folder.
macOS: Finder's Rename with Format
Select the files in Finder, right-click and choose Rename. Pick Format, then Name and Index, type Breaking Bad (2008) - S01E as the custom format, set Where to after name and Start numbers at to 1.
Finder numbers files in the order they appear in the window, and the index has no padding: you get S01E1 to S01E9, then S01E10. Name and Counter pads to five digits (S01E00001), which is worse. The workaround is two passes: rename episodes 1 to 9 with the format Breaking Bad (2008) - S01E0, then the rest with Breaking Bad (2008) - S01E starting at 10.
Replace Text is handy for small cleanups (dots to spaces, for example), but Finder has no pattern matching, so it can't pull the season and episode out of a release name.
A script
If you're comfortable with a terminal, a few lines do the same job on any number of files. This PowerShell version keeps the season and episode from the old name and only shows what it would do until you remove -WhatIf:
$show = "Breaking Bad (2008)"
Get-ChildItem -Filter *.mkv | ForEach-Object {
if ($_.BaseName -match '[Ss](\d{1,2})[Ee](\d{1,3})') {
$new = "{0} - S{1:D2}E{2:D2}{3}" -f $show, [int]$Matches[1], [int]$Matches[2], $_.Extension
Rename-Item -LiteralPath $_.FullName -NewName $new -WhatIf
}
}The same idea for macOS or Linux. Save it as rename.sh, run it with bash rename.sh inside the season folder, and remove echo once the output looks right:
show="Breaking Bad (2008)"
for f in *.mkv; do
if [[ $f =~ [Ss]([0-9]{1,2})[Ee]([0-9]{1,3}) ]]; then
new=$(printf '%s - S%02dE%02d.mkv' "$show" "$((10#${BASH_REMATCH[1]}))" "$((10#${BASH_REMATCH[2]}))")
echo mv -n -- "$f" "$new"
fi
doneScripts are fast but blind. They don't look up episode titles, they break on the first pattern you didn't plan for (double episodes, 1x05, dates), and a typo can rename a whole folder wrongly. Always run the dry run first.
Renaming TV episodes with RenameFlow, step by step
RenameFlow is a web app that handles the detection and lookup for you. It runs in Chrome, Edge or Opera on a desktop computer (Windows, macOS or Linux), renames files in place on your disk and never uploads them: only the titles detected in file names are sent to the metadata services.
- Set up the folders first. RenameFlow renames files only; it does not create, move or rename folders. Create
Breaking Bad (2008)/Season 01,Season 02and so on yourself, and move each episode into its season. - Open [RenameFlow](/) and select the episodes or the show folder. The browser asks for permission to edit them (that's the File System Access API), and access is limited to what you pick.
- Check the detection. RenameFlow reads the show, season and episode from each name, including scene names (quality, source, codec, group) and multi-episode files such as
S01E01-E02. When a file is called something generic likeEpisode 05.mkv, it uses the folder name. Files inside a DVD or Blu-ray structure (VIDEO_TS,BDMV) are left alone. - Confirm the match. Each show is matched on TMDB or TheTVDB, and you confirm or change the match before anything is renamed. This is where you pick Doctor Who (2005) over the 1963 series.
- Pick a preset. Plex and Jellyfin give
Breaking Bad - S01E01 - Pilot.mkv, Kodi givesBreaking Bad S01E01 Pilot.mkv, and Simple givesBreaking Bad S01E01.mkv. With Pro, you can build your own pattern from tokens such as{title},{season},{episode},{episodeTitle}and{quality}. - Review the preview, then rename. Compare a few titles with what actually plays: if they're off by a few episodes, you're probably looking at an aired vs DVD order difference (see above). Every rename is saved in the history, which you can export.
The free plan renames 15 files a day (the count resets at midnight UTC), which covers a season of a short show. Breaking Bad alone is 62 episodes, so for whole libraries Pro costs 2.99 EUR a month or 19.99 EUR a year, and Lifetime is 49 EUR once. Prices include VAT; see pricing. The full walkthrough is in how to rename.
Once your episodes are named, the Subtitles module can find subtitles on OpenSubtitles and save them next to each video (3 downloads a month on the free plan, unlimited on paid plans).
Rename a whole season in a few clicks
RenameFlow reads the show, season and episode in your file names, looks up the titles on TMDB and TheTVDB and renames everything in place. Nothing to install, nothing uploaded.
Try RenameFlow free