Looking for a way to remap file names from a multi-disk TV season

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
fogpuppy
Posts: 1
Joined: 18 Apr 2020, 00:43

Looking for a way to remap file names from a multi-disk TV season

Post by fogpuppy »

Hi all,

I inherited a bunch of folders of TV shows ripped by someone else so asking them to rip them again with better names is not an option (and probably not practicle given the number of files. The general format of the structure looks like this:

Northern_Exposure_Season4_Disk1_Title1.mp4
Northern_Exposure_Season4_Disk1_Title2.mp4
Northern_Exposure_Season4_Disk1_Title3.mp4
Northern_Exposure_Season4_Disk1_Title4.mp4
Northern_Exposure_Season4_Disk2_Title1.mp4
Northern_Exposure_Season4_Disk2_Title2.mp4
Northern_Exposure_Season4_Disk2_Title3.mp4
Northern_Exposure_Season4_Disk2_Title3.mp4
Northern_Exposure_Season4_Disk3_Title1.mp4
Northern_Exposure_Season4_Disk3_Title2.mp4

However, some apparently came off double sided disks so you get names like
Northern_Exposure_Season4_Disk1_side1_Title1.mp4
Northern_Exposure_Season4_Disk1_side1_Title2.mp4
Northern_Exposure_Season4_Disk1__side2_Title1.mp4
Northern_Exposure_Season4_Disk1_side2_Title2.mp4

So essentially the first item on disk 1 one is S04E01 the second is S04E02 ... S04E04. WHen you get to Disk2 then the episodes should be S04E05 .... and so forth. So I'm looking for a way to automate the renaming of these to files that will match the TVDB. Ideally, it would count the number of files with Disk1 (4) and add that to Disk2's episode number and then for disk 3 ....

Is this crazy to expect I could do something like this in FileBot? Is there a simpler way to do that tat I'm missing and I'm jumping through hoops I don't need to jump thru?
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Looking for a way to remap file names from a multi-disk TV season

Post by rednoah »

You'll probably need to manually match files with episode data to some degree. If files and episodes line up naturally, then that's zero effort, because the alphabetic order of your files seems to already align with the natural order of Season 4 episodes.


:idea: Please read FAQ #2 for details.


EDIT:

If you're using the CLI, then -list -rename (rename files in linear order) will do the job:

Code: Select all

$ filebot -list --q "Northern Exposure" --filter "s >= 4" -rename *.mp4 --action TEST --log INFO
[TEST] from [Northern_Exposure_Season4_Disk1_Title1.mp4] to [Northern Exposure - 4x01 - Northwest Passages.mp4]
[TEST] from [Northern_Exposure_Season4_Disk1_Title2.mp4] to [Northern Exposure - 4x02 - Midnight Sun.mp4]
...
:idea: Please read the FAQ and How to Request Help.
Post Reply