I have been searching for examples for my specific use-case but have not found the answers yet.
I want to rename and move files that have either HEVC OR x265, AND 1080P in the file name (or better yet Mediainfo bindings because many times the filename has both HEVC and x265, but other times they may have just one of them). Once I get this basic expression figured out I will then want to expand on it to have more combos like AVC/x264, 720P/2160P etc.
With the above criteria, here is the format I am wanting to rename these files to:
Code: Select all
{n.replaceAll(/[:|]/, " - ")} {s00e00} - {t.replaceAll(/[:|]/, " - ")} (HEVC 1080P)
From my research this is a way to do a basic either/or expression off of the filename.
Code: Select all
{fn =~ /HEVC|x265/ ? 'HEVC 1080P'}
Shawn