Page 1 of 1

Keep the second extension when renaming

Posted: 26 May 2024, 15:51
by Kickaha68
Hello,
I want to keep the second extension when renaming. I have recorded some series with my dreambox and cut it via ts-doctor. So I have a similar problem to viewtopic.php?p=57879&hilit=enigma#p57879.
In addition, I want keep [150] and [5425].
{ ext ==~ /meta|ap|sc/ ? '.ts' : null } prevents filebot to delete the ap and sc extension.
{ fn.match(/[.]ts/) } is not working: Pattern not found: [.]ts
I've already watched https://youtu.be/cihWAvDW7MM?t=30

I am using FileBot 5.1.3.0 from Microsoft Store
I hope someone can help me

Destination file already chosen:
Multiple files map to the same destination path [Tele-Gym 23 Gesunder Rücken - S23E01 - Lendenwirbelsäule und Oberer Rücken.[5425].srt | Tele-Gym 23 Gesunder Rücken - S23E01 - Lendenwirbelsäule und Oberer Rücken.[150].srt] Tele-Gym - S08E01 - Lendenwirbelsäule und oberer Rücken.srt.
The highest-quality file Tele-Gym 23 Gesunder Rücken - S23E01 - Lendenwirbelsäule und Oberer Rücken.[150].srt was chosen over Tele-Gym 23 Gesunder Rücken - S23E01 - Lendenwirbelsäule und Oberer Rücken.[5425].srt


Juergen

Re: Keep the second extension when renaming

Posted: 26 May 2024, 17:46
by rednoah
You can match information from the file path, e.g. [ some number ] at the end of the file name, like so:

Format: Select all

{ fn.match(/\.\[\d+\]$/) }
:idea: \.\[\d+\]$ is a regular expression that matches patterns such as .[150] at the end of the file name.

Re: Keep the second extension when renaming

Posted: 26 May 2024, 19:48
by Kickaha68
Hello rednoah,
you saved my day :D

It works. Thanks for your fast response