excluding some names from scheme

All about user-defined episode / movie format expressions
Post Reply
fireheart2008
Posts: 35
Joined: 29 Jul 2014, 05:39

excluding some names from scheme

Post by fireheart2008 » 13 Feb 2019, 10:17

I want to exclude certain movies from the naming scheme in 2 levels of directory
folder1\folder2
i've managed to do so by using the 3ry operator {n=~/movie1|movie2|movie9/ ? : } but this [long] line ends up repeated as the argument is different. it's working fine but I think it may be shortened

can i store the names in some variable or something then the second line i don't write it again?
or even better can i put these names in text file to be looked up by the code?

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

Re: excluding some names from scheme

Post by rednoah » 13 Feb 2019, 15:07

Yes, and Yes.

e.g.

Code: Select all

Movies/{n in readLines('/path/to/certain-movies.txt') ? plex.name : plex.tail}
:idea: Please read the FAQ and How to Request Help.

Post Reply