How do I match information from the entire file path? (file name or folder name)
Posted: 24 Mar 2023, 22:47
Hi
I would like to use a preset that could find a specific word in Folder name or in File name if it doesnt find it in folder (yeah because sometime, the folder name are badly named but the file name are correctly tag or vice versa)
how I could use the matchAll with that code too?
so when it find the first match, it won't show the second one (sometime like a 'if cmd'
what's the best way I could ask it to do that kind of matching?
Thanks a lot taking your time to answer me
maybe the answer are much more easier than I though or I am too tired to find it by myself lol
Best Regards
I would like to use a preset that could find a specific word in Folder name or in File name if it doesnt find it in folder (yeah because sometime, the folder name are badly named but the file name are correctly tag or vice versa)
Code: Select all
/data/output/{~plex.id % {" ${folder.name.matchAll(/(TRUEFRENCH)|\.(MULTi)\.|(SUBFRENCH)|(CUSTOM)|\.(QC)\./)}"}
Code: Select all
${fn.matchAll(/(TRUEFRENCH)|\.(MULTi)\.|(SUBFRENCH)|(CUSTOM)|\.(QC)\./)}"}
Code: Select all
if -> {" ${folder.name.matchAll(/(TRUEFRENCH)|\.(MULTi)\.|(SUBFRENCH)|(CUSTOM)|\.(QC)\./)}"}
if don't find, look in ${fn.matchAll(/(TRUEFRENCH)|\.(MULTi)\.|(SUBFRENCH)|(CUSTOM)|\.(QC)\./)}"}
Thanks a lot taking your time to answer me
maybe the answer are much more easier than I though or I am too tired to find it by myself lol
Best Regards