Keep everything after

Advanced Renamer forum
#1 : 27/03-24 01:17
Frank Diddly
Posts: 2
Hello,

Fairly green to this, might be a dumb question but how do I keep everything after a specific word number? Trying to rename and format but keep existing file episode names. The file order (DVD, etc) doesn't always match the TV Show import method based on the file source.

i.e.
existing file name:
Show Name S1E1 Pilot.mp4

<Word:1> <Word:2> - S01E<Inc NrDir:1> - <Word:3> to the last word of the file name.

Desired result:
Show Name - S01E01 - Pilot.mp4
Show Name - S01E02 - Episode 2 Name.mp4
Etc.

P.S. version 3.88

edited: 27/03-24 01:19
#2 : 27/03-24 01:39
Delta Foxtrot
Posts: 324
Reply to #1:

Hi Frank,

I'm not clear on what you are trying to do. According to your example existing filename, you already have the season/episode numbers, why would you use "<IncNrDir>"?

At any rate, without using regular expressions, anything after the last <word> tag can be included with an asterisk (*), although if you don't specify (at least in a replace method) you should end up with the rest of the filename being retained. If you are trying to use a New name method, just add the asterisk.

Please let me know if I misunderstood, this isn't a difficult problem.

Best regards,
DF
#3 : 27/03-24 02:12
Frank Diddly
Posts: 2
Reply to #2:
Sorry, ultimately what I am trying to do is fix season and episode numbering in the existing file name so it will order out correctly based on existing file order. Plex won't recognize the current order because "0" was missing from the season number and episode number. Depending on which file order you use in Plex (TV vs DVD vs what database to draw from) it will screw up all the episode numbers, naming and ordering if done incorrectly when there are more than 9 seasons.

S1E1 vs S01E01

I was attempting to use the New Name method but simply using the following Replace method did the trick:

Replace: <Word:3> "Season and episode info"
With: S01E<Inc NrDir:1>

This way Plex draws the file order and naming from the existing files correctly.

I have run into similar issues with combined part 1 and part 2 tv episode files in the past. Plex fails to recognize the episodes are combined and episode 3 (2nd file) is recognized as episode 2 (second part of combined parts) throwing everything down stream off. But that's a whole different comPLEXity, lol.

Thanks again for your input!