add something to filename but only if filebot finds it?

All about user-defined episode / movie / file name format expressions
Post Reply
mterrill
Posts: 32
Joined: 21 May 2018, 21:08

add something to filename but only if filebot finds it?

Post by mterrill »

Sorry, I know this is probably basic...but i just cant find the info I am looking for or what to cal lit....

But my current TV naming scheme is below

Code: Select all

D:/TV/{n.colon(" - ")}/{regular ? 'Season' + s : 'Season0'}/{n.colon(" - ")} - {s00e00} - {t.replaceAll(/[!?.]+$/).replaceAll(/[`´‘’ʻ]/, "'")
.replacePart(', Part $1').colon(" - ")} [{group}]
how do i get the group name to be encased in [ ] but only if it finds a group? and leaves them out if no group is found....

i.e.
an episode with a group Showname - S03E01 - Fire Escape [LAZY].mkv
an episode without a group Showname - S03E02 - The land of oz .mkv
User avatar
rednoah
The Source
Posts: 22973
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: add something to filename but only if filebot finds it?

Post by rednoah »

e.g.

Code: Select all

{ [group] }

Code: Select all

{ "[$group]" }
:idea: viewtopic.php?t=1895
:idea: Please read the FAQ and How to Request Help.
mterrill
Posts: 32
Joined: 21 May 2018, 21:08

Re: add something to filename but only if filebot finds it?

Post by mterrill »

rednoah wrote: 22 Aug 2022, 10:23 e.g.

Code: Select all

{ [group] }

Code: Select all

{ "[$group]" }
:idea: viewtopic.php?t=1895
Thank you!
Post Reply