Page 1 of 1

Sanity check - help moving nfo/fanart with movie

Posted: 19 Feb 2017, 05:12
by diedrichg
I need some help please. I'm completely ignorant to this type of code, how would I get this to work? Also, does this code go in the format editor?

Code: Select all

M:/Movies/{n} ({y})/{n} ({y}) - {vf}{fn.match(/(?i)-banner|-fanart|-fanart1|-fanart2|-fanart3|-fanart4|-fanart5|-fanart6|-fanart7|-fanart8|-clearart|-logo|-poster|-landscape/)}
I need to:
  1. Rename the movie.
  2. Rename the associated fanart and nfo to the movie name but I need to keep the -logo, -fanart1, fanart2, etc at the end of their respective files.
  3. Finally, move all these files to the main movie folder.
Current structure
Image

Desired structure
Image

Re: Sanity check - help moving nfo/fanart with movie

Posted: 19 Feb 2017, 13:29
by rednoah
Looks like you're on the right track. What's not working?

Re: Sanity check - help moving nfo/fanart with movie

Posted: 19 Feb 2017, 15:38
by diedrichg
Weird! I was given some sort of script error last night. Today, it's working! Awesome. Thanks and sorry for taking up your time!

Image

Re: Sanity check - help moving nfo/fanart with movie

Posted: 21 Feb 2017, 01:51
by diedrichg
I remember now, I do have one additional question.

In the screenshot above in post # 3 - You can see that the Original Files are named fanart, fanart2, fanart3 as named by Emby. But on the New Names, it's not retaining the numerical order. Is it possible to retain the numerical order? Emby won't be happy if I don't retain this format.

Re: Sanity check - help moving nfo/fanart with movie

Posted: 21 Feb 2017, 03:42
by rednoah
Match /fanart[0-9]/ instead of /fanart/ in your format?

e.g.

Code: Select all

fn.match(/banner|fanart[0-9]*|clearart|logo|poster|landscape/)