Hey there, love this software. I have some episode titles that are in this format:
031 Star Wars The Clone Wars - S02E19
The number at the beginning signifies the chronological order this episode takes place, since the series as a whole is not in chronological order. I want to rename them with filebot so I get all the episode titles, but preserve the chronology numbers at the beginning, like so:
031 Star Wars The Clone Wars - S02E19 - The Zillo Beast Strikes Back
What is the easiest way to do this by editing the format? My format is like this right now: {n} - {s00e00} - {t}
Edit Format: preserve beginning of filename
Re: Edit Format: preserve beginning of filename
Code: Select all
{absolute.pad(3)} {n} - {s00e00} - {t}
Code: Select all
{fn.match(/\d{3}/)} {n} - {s00e00} - {t}
Re: Edit Format: preserve beginning of filename
{airdate} might also work well since we're talking about chronological order, assuming that episodes were aired in chronological order:
Code: Select all
[{airdate}] {n} - {s00e00} - {t}
-
- Posts: 3
- Joined: 02 Oct 2020, 20:55
Re: Edit Format: preserve beginning of filename
They were not aired chronologically. It was only after they all aired in season order that they released a chronological viewing order for the whole series. I will try those suggestions and see what happens
Re: Edit Format: preserve beginning of filename
In this case, the fn.match() approach recommended by kim will work best, i.e. just copy over the number from the source file path into the destination file path. Alternatively, the {i} binding (i.e. item row index as seen in the UI) might work as well, but only if you process files sequence by sequence.
-
- Posts: 3
- Joined: 02 Oct 2020, 20:55
Re: Edit Format: preserve beginning of filename
Awesome, the fn.match() works perfectly. The {i} binding works as well if I am doing all of the episodes at once. What do the "/\" symbols mean in the fn.match though? I can't seem to parse out their purpose
Re: Edit Format: preserve beginning of filename
The /.../ slashy string literal makes writing regular expressions easier:
https://groovy-lang.org/syntax.html#_slashy_string
\ is part of the regular expression, e.g. used for character classes:
https://regexr.com/
https://groovy-lang.org/syntax.html#_slashy_string
\ is part of the regular expression, e.g. used for character classes:
https://regexr.com/