> For the complete documentation index, see [llms.txt](https://www.tvrename.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.tvrename.com/menu/options-menu/filename-template-editor.md).

# Filename Template Editor

<figure><img src="https://3508557057-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fx0gPeIfHpbgTioNust1M%2Fuploads%2FcwRe1COhhqoRfHSAg8RK%2Fimage.png?alt=media&amp;token=c1345b61-b0c2-45cf-acf9-1e842c30b7a1" alt=""><figcaption></figcaption></figure>

This is where the format of the filenames that TV Rename will rename to is defined.

To help illustrate the results the “Sample and Test:” panel contains the processed entries from the show and season selected in the ***TV Shows*** tab.

The “Naming template:” text box displays a tokenised version of the filename which can be edited directly or populated using the “Tags:” drop-down, or overwritten with a record selected from the “Presets:” drop-down. Any changes in the “Naming Template:” are automatically reflected in the “Sample and Test:” panel.

The available tags with their definitions are listed below: -

<table data-header-hidden data-search="false"><thead><tr><th width="187"></th><th></th></tr></thead><tbody><tr><td>{ShowName}</td><td>Name of the Show</td></tr><tr><td>{ShowNamePost}</td><td>Name of the show with the words set next to “Move ‘The’ to the end of tv show/movie names” on the Display tab of <a href="https://www.tvrename.com/menu/preferences/display.md">Preferences</a> moved to the end, eg “The Hollow Crown” becomes “Hollow Crown, The”</td></tr><tr><td>{ShowNameInitial}</td><td>First letter of the show name, in lower case</td></tr><tr><td>{ShowNameLower}</td><td>Show name in lower case, with spaces changed to “-” and brackets and some other symbols removed</td></tr><tr><td>{ShowNameNoYear}</td><td>Show name without a year in brackets at the end, eg “Doctor Who (2005)” becomes “Doctor Who”</td></tr><tr><td>{Year}</td><td>Year the show started</td></tr><tr><td>{Season}</td><td>Number of the season</td></tr><tr><td>{Season:2}</td><td>Number of the season forced to 2 characters with a leading zero</td></tr><tr><td>{SeasonName}</td><td>Name of the season, if the data source gives it one</td></tr><tr><td>{SeasonYear}</td><td>Year the season started</td></tr><tr><td>{Episode}</td><td>Number of the episode (within a season), eg S01E03</td></tr><tr><td>{Episode2}</td><td>Number of the second episode of a pair (within a season), eg S01E04-E05<br>(created by the default S{Season:2}E{Episode}[-E{Episode2}])</td></tr><tr><td>{EpisodeName}</td><td>Name of the Episode</td></tr><tr><td>{Number}</td><td>Overall number of the episode</td></tr><tr><td>{Number:2}</td><td>Overall number of the episode forced to 2 characters with a leading zero</td></tr><tr><td>{Number:3}</td><td>Overall number of the episode forced to 3 characters with leading zero(s)</td></tr><tr><td>{SeasonNumber}</td><td>Some season numbers do not start at 1, eg they may go 2012,2013,2014. {SeasonNumber} is the nth season, so would be 1,2,3 in this example</td></tr><tr><td>{SeasonNumber:2}</td><td>As above, but forced to 2 characters with a leading zero</td></tr><tr><td>{ShortDate}</td><td>Air date in short format, eg 25/12/2017</td></tr><tr><td>{LongDate}</td><td>Air date in long format, eg 25 December 2017</td></tr><tr><td>{YMDDate}</td><td>Air date in YMD format, eg 2017/12/25</td></tr><tr><td>{AllEpisodes}</td><td>All episodes - E01E02 etc</td></tr><tr><td>{Imdb}</td><td>IMDb ID of the episode</td></tr><tr><td>{ShowImdb}</td><td>IMDb ID of the show (different from the episode’s)</td></tr></tbody></table>

<table data-header-hidden><thead><tr><th width="119"></th><th></th></tr></thead><tbody><tr><td><em>Default:</em></td><td><em><strong>{ShowName} - S{Season:2}E{Episode}[-E{Episode2}] - {EpisodeName}</strong></em></td></tr><tr><td></td><td>(the second preset).</td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://www.tvrename.com/menu/options-menu/filename-template-editor.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
