Adjustment to Bob Swifts naming script

Hi, I’m a relatively new user.

Programming languages are definitely not my strong suit, so please excuse my lack of knowledge on the subject.

Anyway, I’ve been using @rdswift Bob Swift naming script and was just trying to make a small adjustment to the structure with not much success.

I am trying to use title release year and title catalog but would like the year to come before the title catalog.

So instead of:

[1967] Strange Days [7559-74014-2, 1991]

I’m looking for

[1967] Strange Days [1991, 7559-74014-2]

I tried cut and pasting a few things around, but that definitely wasn’t fruitful for me.

Not sure if this is a simple ask, don’t want to waste anyone’s time.

Any help is greatly appreciated!

Assuming that you’re using the latest version of my script (available from my repo on GitHub, you need to replace lines 294-312 with the following"

$if(%_aTitleReleaseYear%,$if(%date%,
        $set(_temp,$left(%date%,4))
        $if($ne([%_temp%],%_nYear%),
            $set(_nTitleExtra,$trim(%_temp%\,))
        )
    )
)
$if(%_aTitleLabel%,$if(%label%,
        $setmulti(_temp,%label%)
        $set(_nTitleExtra,%_nTitleExtra% $getmulti(%_temp%,0))
    )
)
$if(%_aTitleCatalog%,$if(%catalognumber%,
        $setmulti(_temp,%catalognumber%)
        $set(_nTitleExtra,%_nTitleExtra%$getmulti(%_temp%,0))
    )
)
$if(%_nTitleExtra%,$set(_nTitleExtra, [$trim(%_nTitleExtra%, \,)]))

Note that this is just off the top of my head and I haven’t tested it. I suggest that you give it a try and let us know whether or not it works for you.

3 Likes

This worked perfectly.

Thank you for your time, I really appreciate it.

2 Likes