Moving TV-show to specific folder

All about user-defined episode / movie / file name format expressions
Post Reply
b0ssem
Posts: 14
Joined: 20 Mar 2017, 07:56

Moving TV-show to specific folder

Post by b0ssem »

Hi all,

Im wondering if its possible to move a specific tv-show to a specific path.

My current setup looks like this

Code: Select all

filebot -script fn:amc --output C:\TV-IN\Filebot --action move -non-strict --def @C:\TV-IN\Filebot\arg.txt C:\TV-IN\TV\ --log-file C:\TV-IN\Filebot\amc.log --def skipExtract=y --def excludeList=C:\TV-IN\Filebot\amc.txt --def subtitles=swe,eng --lang swe --conflict auto --def minLengthMS=600000 --def clean=y --filter "age < 90" --def plex=192.168.1.8:tokencode
As you see above, I also have a argument file

Code: Select all

movieFormat=P:\X264-8\{n.upperInitial()} ({y})\{n.upperInitial()} ({y})
seriesFormat=P:\TV-10\{n.upperInitial()}\{s00e00.replaceAll(/E[0-9]+/)}\{n.upperInitial()} - {s00e00} - {t}
And now to my question:
I want a tv-show (Julkalendern.2021.En.Hederlig.Jul.Med.Knyckertz.E07.SWEDiSH.1080p...) to be renamed as defined in the seriesformat above, but instead be moved to a specific path, such as X:\Barn-TV\En Hederlig Jul Med Knyckertz

What is the best way of doing this? Is it conditional structures? Please give some input on what would be the best practice here.

Thanks!
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Moving TV-show to specific folder

Post by rednoah »

If it's just about moving different episodes to different destination folders, then something like this will work:

Code: Select all

{genre =~ /Children/ ? 'X:/Children' : 'Y:/TV Shows'}/{plex.tail}

However, you essentially want to use completely different formats, depending on the file at hand, which effectively requires you to write your entire format code as one single Groovy expression:

Code: Select all

{
	genre =~ /Children/ ? "X:/Children/${plex.name}" : "Y:/${plex.tail}"
}
:idea: Please read the FAQ and How to Request Help.
Post Reply