Using {model} to create collection folders only for multiple movies

All about user-defined episode / movie / file name format expressions
Post Reply
ye62dzec
Posts: 10
Joined: 09 Jan 2025, 16:24

Using {model} to create collection folders only for multiple movies

Post by ye62dzec »

Hi everyone,

I'm trying to optimize my movie organization in FileBot. Currently using this format:

Code: Select all

{collection + '/'}{plex.name} - {audioLanguages.ISO2.joining(', ', '[', ']').upper()} {allOf{vf}{vc}{hdr.replace("Dolby Vision":"DV")}.joining(' ', ' [', ']')}/{plex.name} - {audioLanguages.ISO2.joining(', ', '[', ']').upper()} {allOf{vf}{vc}{hdr.replace("Dolby Vision":"DV")}.joining(' ', ' [', ']')}
The issue is that it creates collection folders even for standalone movies. For example:

Code: Select all

- Single movie: "8MM (1999).mkv" → "8MM Collection/8MM (1999).mkv"
- Multiple movies work fine: "Batman Begins" + "Dark Knight" → "Batman Collection/[movies]"
I understand the {model} binding can be used to check for multiple movies in a collection before creating the folder structure. Can you help me integrate this into my current format to only create collection folders when there are 2+ movies?

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

Re: Using {model} to create collection folders only for multiple movies

Post by rednoah »

e.g.

Format: Select all

{ if (model.collection.count(collection) >= 2) collection + '/' }
:idea: Please read the FAQ and How to Request Help.
ye62dzec
Posts: 10
Joined: 09 Jan 2025, 16:24

Re: Using {model} to create collection folders only for multiple movies

Post by ye62dzec »

Perfect! Thank you!
Post Reply