I've made a small change to what you posted since it had to be 3 fandoms or more instead of 2, I've also deleted the
- because it added it to the end of the folder names whenever there was only 1 or 2 fandoms
Can you add a string for when it's only 2 fandoms it needs to add them to a folder named Crossovers but it needs to keep the fandoms?
Code:
program:
tmp1 = template('{#fandom_main:sublist(0,2,\,)}{#fandom_secondary:sublist(0,2,\,)}/{author}/{title} ({#story_id})');
tmp2 = template('Multiple Crossovers/{author}/{title} ({#story_id})');
cmp(
count(
field('#fandom_main'),
','),
3,
tmp1,
tmp2,
tmp2)