More > JRiver Media Center 30 for Mac

Remove Hung Closing Parenthesis From Renamed Folder

(1/14) > >>

AudibleImagery:
Hello Interact,

I'm trying to write a Directory Rule for the Rename, Move, & Copy Files library tool. I want my folder structures to look like this: [Album Artist]/[Date] - [Album] [Catalog #] resulting in folder structures like this: Hawkwind/1977 - Quark, Strangeness and Charm (2009 Atomhenge (Europe) - ATOMCD 2009)/. I want the rule to make it so that the [Date] and [Catalog #] values only appear in the folder name when there are numbers in the [Date] field and characters in the [Catalog #] field, respectively. The current rule that I've come up with is as follows: [Album Artist]/if(isempty([Date],1),,[Date] -) [Album] if(isempty([Catalog #],1),,([Catalog #])). This rule works fine when there is a [Catalog #] value but when there isn't one it results in a folder structure like this: Hawkwind/1975 - Warrior on the Edge of Time )/. As you can see, there is a hung closing parenthesis that I have been unable to remove despite banging my head against the wall for the better part of eight hours. I can't simply remove a parenthesis from the end of the Directory Rule because that results in a folder name that is missing a parenthesis at the end of the catalog number like this: Hawkwind/1977 - Quark, Strangeness and Charm (2009 Atomhenge (Europe) - ATOMCD 2009 and so I'm I'm stuck between a rock and a hard place. Could someone please advise me on how to remove this hung parenthesis from my folder names?

Here is a photo of my Rename, Move, & Copy Files library tool for reference:


Regards in advance,
Audible

lepa:
Hello there,
There is no photo included but from your expression i can see that you need escape characters / before parenthesis when parenthesis are not belonging to function but you want to display those.

if(isempty([Catalog #],1),,/([Catalog #]/))

AudibleImagery:

--- Quote from: lepa on February 17, 2023, 02:51:12 am ---Hello there,
There is no photo included but from your expression i can see that you need escape characters / before parenthesis when parenthesis are not belonging to function but you want to display those.

if(isempty([Catalog #],1),,/([Catalog #]/))

--- End quote ---

Hey leap,

I'm sorry about the image not displaying, I reformatted it and so it should display properly now.

I tried your Rule suggestion and it gave me the following result:

I appreciate your effort but unfortunately this isn't what I'm looking for. I'm trying to get it to look like this so that the [Catalog #] comes after the [Album] in the folder name: but it has to be formatted so that albums without a [Catalog #] aren't left with a hanging closing parenthesis as in the image below:

zybex:
Links to images must start with HTTPS - HTTP won't work (it may be visible to you alone)
You can also attach the image directly to the post, click on the "attachments" button.

lepa:
On Windows following gives me folders like this

--- Code: ---[Album Artist]//If(IsEmpty([Year],1),,[Year] -) [Album] If(IsEmpty([Catalog #,0]),,/([Catalog #]/))
--- End code ---
Ram Jam\1978 - Portrait Of The Artist As A Young Ram (EPIC - EPC 82628)
and if there is no catalog
Ram Jam\1978 - Portrait Of The Artist As A Young Ram

Above is following the folder format like below. Is this structure you are after?
[Album Artist]/[Year] - [Album] ([Catalog])\[Filename (name)]
[Album Artist]/[Year] - [Album]

Navigation

[0] Message Index

[#] Next page

Go to full version