INTERACT FORUM

More => Old Versions => JRiver Media Center 30 for Mac => Topic started by: AudibleImagery on February 17, 2023, 12:24:16 am

Title: Remove Hung Closing Parenthesis From Renamed Folder
Post by: AudibleImagery on February 17, 2023, 12:24:16 am
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:
(https://i.ibb.co/jRsjLzr/Screenshot-2023-02-16-at-23-16-01.png)

Regards in advance,
Audible
Title: Re: Remove Hung Closing Parenthesis From Renamed Folder
Post by: 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 #]/))
Title: Re: Remove Hung Closing Parenthesis From Renamed Folder
Post by: AudibleImagery on February 17, 2023, 04:14:49 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 #]/))

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: (https://i.ibb.co/MCN637R/Screenshot-2023-02-17-at-03-05-36.png)

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: (https://i.ibb.co/Hg5SL9w/Screenshot-2023-02-17-at-03-09-21.png) 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:
(https://i.ibb.co/1bZ31KX/Screenshot-2023-02-17-at-03-13-38.png)
Title: Re: Remove Hung Closing Parenthesis From Renamed Folder
Post by: zybex on February 17, 2023, 05:04:47 am
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.
Title: Re: Remove Hung Closing Parenthesis From Renamed Folder
Post by: lepa on February 17, 2023, 05:05:57 am
On Windows following gives me folders like this
Code: [Select]
[Album Artist]//If(IsEmpty([Year],1),,[Year] -) [Album] If(IsEmpty([Catalog #,0]),,/([Catalog #]/))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]
Title: Re: Remove Hung Closing Parenthesis From Renamed Folder
Post by: AudibleImagery on February 17, 2023, 05:55:55 am
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.

Hey zybex,

I reformatted the images again. Are you able to view them now?
Title: Re: Remove Hung Closing Parenthesis From Renamed Folder
Post by: AudibleImagery on February 17, 2023, 06:02:55 am
On Windows following gives me folders like this
Code: [Select]
[Album Artist]//If(IsEmpty([Year],1),,[Year] -) [Album] If(IsEmpty([Catalog #,0]),,/([Catalog #]/))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]

Hey Lepa,

Yes these are the structures I’m after:
Quote
[Album Artist]/[Year] - [Album] ([Catalog])\[Filename (name)]
[Album Artist]/[Year] - [Album]

I’m on Mac OS. I have “Replaces slashes in expressions” checked. I copied and pasted your newest Rules into the Directory field and the folder structure that I got back was: [Album Artist]/[Year] - [Album]/([Catalog #]/)\[Filename (name)]. Note the slash splitting [Album] and [Catalog #] and note the slash inside of the parentheses that [Catalog #] is in: ([Catalog #]/). It's creating three separate folders for [Album], [Catalog #], and the closing parenthesis symbol instead of just creating one folder.
Title: Re: Remove Hung Closing Parenthesis From Renamed Folder
Post by: zybex on February 17, 2023, 06:14:09 am
Hey zybex,

I reformatted the images again. Are you able to view them now?

Nevermind, it was my corporate firewall blocking them - I was on the company VPN  ::)
Title: Re: Remove Hung Closing Parenthesis From Renamed Folder
Post by: zybex on February 17, 2023, 06:31:55 am
Sorry for the silly question, but are you pasting the expression as is or are you replacing the forward-slashes with backslashes?
What MC version do you have?
Try without the "replace slashes" option. MC shows you what it will do to each filename, so you don't actually need to run the Rename do see the results.
Title: Re: Remove Hung Closing Parenthesis From Renamed Folder
Post by: lepa on February 17, 2023, 06:35:17 am
I'm also working  ::)

Lose this:
I have “Replaces slashes in expressions” checked.
EDIT: no need to lose Mac but just that replace check  :D

REF:
https://wiki.jriver.com/index.php/Rename,_Move,_and_Copy_Files
"If you are intentionally using a calculated field to create directory structures in your Directories Template, you can uncheck the Replace slashes in expressions option to pass through any slashes found in an expression or field as-is. "
Title: Re: Remove Hung Closing Parenthesis From Renamed Folder
Post by: AudibleImagery on February 17, 2023, 02:58:00 pm
Sorry for the silly question, but are you pasting the expression as is or are you replacing the forward-slashes with backslashes?
What MC version do you have?
Try without the "replace slashes" option. MC shows you what it will do to each filename, so you don't actually need to run the Rename do see the results.

I'm also working  ::)

Lose this:EDIT: no need to lose Mac but just that replace check  :D

REF:
https://wiki.jriver.com/index.php/Rename,_Move,_and_Copy_Files
"If you are intentionally using a calculated field to create directory structures in your Directories Template, you can uncheck the Replace slashes in expressions option to pass through any slashes found in an expression or field as-is. "

I'm using Media Center 30.0.41 (Intel). I'm pasting the expression as is. The only difference is that I'm using the [Date] field instead of [Year] but other than that the expressions are identical. I unchecked the "replace slashes" option and am still experiencing the same issue. Here's a screenshot of the Rename, Move, and Copy Files window:

(https://i.ibb.co/yS4j19q/Screenshot-2023-02-17-at-13-48-59.png)

The photo is a little grainy but I used the code Lepa gave me:
Code: [Select]
[Album Artist]//If(IsEmpty([Date],1),,[Date] -) [Album] If(IsEmpty([Catalog #,0]),,/([Catalog #]/))
The folder structure is formatting as follows: [Album Artist]/[Date] - [Album]/[Catalog #]/)/[Filename (name)] which results in a folder structure like this:
Code: [Select]
Hawkwind/1978 - 25 Years on (Disc Two)/(2009 Atomhenge (UK) - ATOMCD 2006/)/[Filename (name)]
Title: Re: Remove Hung Closing Parenthesis From Renamed Folder
Post by: lepa on February 17, 2023, 03:30:58 pm
You could try without escapes (keep the replace slash.. unchecked), maybe Mac version is handling that escaping differently. seems to me that in your system escapes instead just creates new folders. Maybe some Mac guys could chime in if it doesn't work or MC devs if this a bug in Mac version...
Code: [Select]
[Album Artist]//If(IsEmpty([Date],1),,[Date] -) [Album] If(IsEmpty([Catalog #,0]),,([Catalog #]))
Title: Re: Remove Hung Closing Parenthesis From Renamed Folder
Post by: zybex on February 17, 2023, 03:32:11 pm
I could briefly reproduce your problem - MC showed and extra ")" but only once, then it started working correctly again ? Looks like there's some sort of bug handling the forward slashes, but I can't reproduce it now. It showed the bug when I was typing an expression, but it worked correctly when I pasted the full expression in one go... weird.

EDIT: ninja'd by Lepa

Try pasting this with the "replace shashes" option enabled:
[Album Artist]\If(IsEmpty([Date],1),,[Date] -) [Album]If(IsEmpty([Catalog #,0]),,/([Catalog #]/))
Or this with that option OFF:
[Album Artist]//If(IsEmpty([Date],1),,[Date] -) [Album]If(IsEmpty([Catalog #,0]),,/([Catalog #]/))
Title: Re: Remove Hung Closing Parenthesis From Renamed Folder
Post by: AudibleImagery on February 17, 2023, 03:56:56 pm
You could try without escapes (keep the replace slash.. unchecked), maybe Mac version is handling that escaping differently. seems to me that in your system escapes instead just creates new folders. Maybe some Mac guys could chime in if it doesn't work or MC devs if this a bug in Mac version...
Code: [Select]
[Album Artist]//If(IsEmpty([Date],1),,[Date] -) [Album] If(IsEmpty([Catalog #,0]),,([Catalog #]))

This works for albums with a catalog number but for albums without one it still leaves a closing parenthesis at the end of an album title " )" such as "2008 - The Dream Goes On - An Anthology 1985-1997 (Disc One) )"
Title: Re: Remove Hung Closing Parenthesis From Renamed Folder
Post by: AudibleImagery on February 17, 2023, 04:10:25 pm
Try pasting this with the "replace shashes" option enabled:
[Album Artist]\If(IsEmpty([Date],1),,[Date] -) [Album]If(IsEmpty([Catalog #,0]),,/([Catalog #]/))
[/font]

This expression is the closest we've gotten so far but it still leaves a closing parenthesis at the end of an album title ")" such as "2008 - The Dream Goes On - An Anthology 1985-1997 (Disc One))"
Title: Re: Remove Hung Closing Parenthesis From Renamed Folder
Post by: zybex on February 17, 2023, 04:14:15 pm
That's expected when not escaping the closing parenthesis. The problem is the escaping leaves the slash (bug?):

What about a workaround:
[Album Artist]//If(IsEmpty([Date],1),,[Date] -) [Album] If(IsEmpty([Catalog #,0]),,char(40)[Catalog #]char(41))
Title: Re: Remove Hung Closing Parenthesis From Renamed Folder
Post by: AudibleImagery on February 17, 2023, 11:11:58 pm
That's expected when not escaping the closing parenthesis. The problem is the escaping leaves the slash (bug?):

What about a workaround:
[Album Artist]//If(IsEmpty([Date],1),,[Date] -) [Album] If(IsEmpty([Catalog #,0]),,char(40)[Catalog #]char(41))


Zybex and Lepa,

Thank you so much for taking the time to help me.

I'm all for a workaround at this point and it worked like a charm. Thanks again! Could you explain how the char function is supposed to work? I tried to look it up but the information on the JRiver wiki is sparse.

Regards,
John
Title: Re: Remove Hung Closing Parenthesis From Renamed Folder
Post by: zybex on February 18, 2023, 02:15:00 am
https://wiki.jriver.com/index.php/Miscellaneous_Functions#Char

The Char() function prints a single symbol corresponding to the given ASCII/Unicode character. Here's a table for the common values:
https://www.rapidtables.com/code/text/ascii-table.html

You can see 40 = open parenthesis and 41 = closing. Since MC isn't handling the /( and /) correctly in the rename tool on Mac, the function gives us another way of inserting those same symbols without breaking MC.
Title: Re: Remove Hung Closing Parenthesis From Renamed Folder
Post by: marko on February 18, 2023, 03:54:10 am
I have a quick question relating to text case...

I personally like things to be properly capitalised, but I'm also lazy... so, when I'm writing expressions, as they're never going to be displayed anywhere, and Windows is not case-sensitive, the expression functions and library fields are more often than not written 'all lower case'.

When using Mac (or Linux) do the expression functions and [library fields] all need to be cased correctly to work?

My laziness recently caused me much pain as I needed to go through all of my skin xml files and correct the case of the referenced image filenames. I did not enjoy that very much, at all :)
Title: Re: Remove Hung Closing Parenthesis From Renamed Folder
Post by: JimH on February 18, 2023, 07:56:36 am
As you found, file names on linux and Mac need to be explicit with respect to capitalization.  The same is true for directories.

You can have files or directories named AA, Aa, aA, and aa and they are all different. 

Anything MC doesn't.  An expression, for example.
Title: Re: Remove Hung Closing Parenthesis From Renamed Folder
Post by: AudibleImagery on March 04, 2023, 05:58:49 pm
That's expected when not escaping the closing parenthesis. The problem is the escaping leaves the slash (bug?):

What about a workaround:
[Album Artist]//If(IsEmpty([Date],1),,[Date] -) [Album] If(IsEmpty([Catalog #,0]),,char(40)[Catalog #]char(41))


Hey Zybex,

I've evolved this renaming convention using the code you gave me from the album column thread. Here's what it is currently:
Code: [Select]
[Album Artist]//trim(replace(replace([Album, 1],[Lossy],),[Incomplete],)) If(IsEmpty([Catalog #,0]),,char(40)[Catalog #]char(41))
This is a step in the right direction for the folder structure I'm trying to create but a problem has arisen with the catalogue number that I don't know how to resolve. I sometimes combine different album presses for a variety of reasons, such as when I add Japanese bonus tracks to an American press to a create a fuller, more complete album. This is creating a problem where multiple folders are being created for one album because of there being multiple catalogue numbers for a single album. Other than throwing out the catalogue number renaming expression, can you offer a solution that could fix this problem?
Title: Re: Remove Hung Closing Parenthesis From Renamed Folder
Post by: lepa on March 05, 2023, 01:22:05 am
You could make a new field, say [Hybrid] and check it for this kind of hybrid albums. Then in your rename expression check also that if [hybrid] has a value, then don't use catalog # in the filename but use e.g. text (Hybrid) instead or nothing at all.
Title: Re: Remove Hung Closing Parenthesis From Renamed Folder
Post by: zybex on March 05, 2023, 04:52:24 am
What Lepa said :)

Just a minor edit to your expression - the Trim() should apply to the entire expression in order to remove the ending space when the Catalog# is empty:

[Album Artist]//trim(replace(replace([Album, 1],[Lossy],),[Incomplete],) If(IsEmpty([Catalog #,0]),,char(40)[Catalog #]char(41)))
Title: Re: Remove Hung Closing Parenthesis From Renamed Folder
Post by: AudibleImagery on March 15, 2023, 05:29:41 pm
You could make a new field, say [Hybrid] and check it for this kind of hybrid albums. Then in your rename expression check also that if [hybrid] has a value, then don't use catalog # in the filename but use e.g. text (Hybrid) instead or nothing at all.

I'm still new to these expressions and so how would I go about implementing this according to my current renaming expression?:
[Album Artist]//trim(replace(replace([Album, 1],[Lossy],),[Incomplete],) If(IsEmpty([Catalog #,0]),,char(40)[Catalog #]char(41)))

How would I tell the [Hybrid] field to 'check' for hybrid albums? Also, how would I tell the renaming expression to use the [Hybrid] value instead of the catalog # value?

What Lepa said :)

Just a minor edit to your expression - the Trim() should apply to the entire expression in order to remove the ending space when the Catalog# is empty:

[Album Artist]//trim(replace(replace([Album, 1],[Lossy],),[Incomplete],) If(IsEmpty([Catalog #,0]),,char(40)[Catalog #]char(41)))

Hey zybex, this expression is adding an extra space at the beginning of the [catalogue #] field and so catalogue #'s are coming out like "Ink is My Drink  (Bandcamp)" (note the two spaces between the album title and catalogue #). The unedited expression is giving me no trouble.
Title: Re: Remove Hung Closing Parenthesis From Renamed Folder
Post by: zybex on March 15, 2023, 06:52:28 pm
You're right, you actually need 2 trims to also remove the leftover space in [Album] after the "[Lossy]" is removed:

[Album Artist]//trim(trim(replace(replace([Album, 1],[Lossy],),[Incomplete],)) If(IsEmpty([Catalog #,0]),,char(40)[Catalog #]char(41)))

or moving the space around:
[Album Artist]//trim(replace(replace([Album, 1],[Lossy],),[Incomplete],))If(IsEmpty([Catalog #,0]),,/ char(40)[Catalog #]char(41))
Title: Re: Remove Hung Closing Parenthesis From Renamed Folder
Post by: AudibleImagery on March 17, 2023, 07:38:56 pm
You're right, you actually need 2 trims to also remove the leftover space in [Album] after the "[Lossy]" is removed:

[Album Artist]//trim(trim(replace(replace([Album, 1],[Lossy],),[Incomplete],)) If(IsEmpty([Catalog #,0]),,char(40)[Catalog #]char(41)))

or moving the space around:
[Album Artist]//trim(replace(replace([Album, 1],[Lossy],),[Incomplete],))If(IsEmpty([Catalog #,0]),,/ char(40)[Catalog #]char(41))

Hey zybex,

Thank you for this amendment. I still didn't seem to have any trailing spaces after using the old expression but I appreciate this expression as a failsafe.
Title: Re: Remove Hung Closing Parenthesis From Renamed Folder
Post by: AudibleImagery on March 17, 2023, 07:54:25 pm
You could make a new field, say [Hybrid] and check it for this kind of hybrid albums. Then in your rename expression check also that if [hybrid] has a value, then don't use catalog # in the filename but use e.g. text (Hybrid) instead or nothing at all.

Hey lepa and zybex,

I'm having trouble deriving all catalogue numbers from a given album for the [Hybrid] field. For the past fews hours I've tested innumerable combinations from this list https://wiki.jriver.com/index.php/List_Manipulation_Functions#ListFind (https://wiki.jriver.com/index.php/List_Manipulation_Functions#ListFind) while also referring to this recent post about list manipulation that you both participated in https://yabb.jriver.com/interact/index.php/topic,134242 (https://yabb.jriver.com/interact/index.php/topic,134242) but I'm not getting anywhere due in large part to my computer and coding illiteracy. What do you suggest? Any help would be greatly appreciated because I'm almost done with this renaming expression.
Title: Re: Remove Hung Closing Parenthesis From Renamed Folder
Post by: lepa on March 18, 2023, 02:50:11 am
Assuming you have created the Hybrid field: Then you could use e.g. IfElse() to first check that if hybrid exist (display hybrid) and if not then check if there is catalog # (display catalog #) and last as neither exist then do nothing. Last part is not probably needed but it helps to visualize the example. Like this:

Code: [Select]
IfElse(
    Not(IsEmpty([Hybrid,0])),
        / char(40)Hybridchar(41),
    Not(IsEmpty([Catalog #,0])),
        / char(40)[Catalog #]char(41),
    1,
)

The whole thingy would then be:
Code: [Select]
[Album Artist]//trim(replace(replace([Album, 1],[Lossy],),[Incomplete],))/
IfElse(
    Not(IsEmpty([Hybrid,0])),
        / char(40)Hybridchar(41),
    Not(IsEmpty([Catalog #,0])),
        / char(40)[Catalog #]char(41),
    1,
)
Title: Re: Remove Hung Closing Parenthesis From Renamed Folder
Post by: zybex on March 18, 2023, 04:49:27 am
That screenshot is really foggy and unreadable :P HDR?

The missing link is, I think: you need to create an [Hybrid] field with the "Relational" type set to "Store one value for each Album Artist (auto)". Then go to hybrid albums and set that field to "1" (or "yes", or anything really). You just need to set the value for a single file of each hybrid value and, because it's a relational field, all tracks of the same album will have that same value.

Then Lepa's expression will work - it checks if the [Hybrid] has a value for any given file, and renames the file accordingly.
Title: Re: Remove Hung Closing Parenthesis From Renamed Folder
Post by: lepa on March 18, 2023, 05:54:20 am
Yep, field can be relational also. If it is relational then I guess you need to be sure that you set it to hybrid only after you have set album name for that new hybrid album. If not relational then you need to mark every track individually.

Image looks little bland but still readable to me
Title: Re: Remove Hung Closing Parenthesis From Renamed Folder
Post by: zybex on March 18, 2023, 06:10:51 am
This is what I [don't] see.
Title: Re: Remove Hung Closing Parenthesis From Renamed Folder
Post by: lepa on March 18, 2023, 06:22:36 am
Strange. looks like this for me (thumbnail so blurry now. dark gray bg). HDR is not active
Title: Re: Remove Hung Closing Parenthesis From Renamed Folder
Post by: zybex on March 18, 2023, 07:07:12 am
Your PNG is actually transparent! So with the default lightblue-ish background of this forum, it renders almost blank. So it's probably your screenshot tool doing that?

How come you have the forum in black, I don't see any dark theme... is it a CSS plugin in the browser?
Title: Re: Remove Hung Closing Parenthesis From Renamed Folder
Post by: lepa on March 18, 2023, 07:31:08 am
I'm using dark reader firefox plugin to get dark mode where it is not available. Screenshot is taken with win10 internal shift+win+c. Resized/replaced image with irfaview so it probably have some transparency settings on for png then by default i'd guess
Title: Re: Remove Hung Closing Parenthesis From Renamed Folder
Post by: AudibleImagery on March 19, 2023, 02:33:51 am
Assuming you have created the Hybrid field: Then you could use e.g. IfElse() to first check that if hybrid exist (display hybrid) and if not then check if there is catalog # (display catalog #) and last as neither exist then do nothing. Last part is not probably needed but it helps to visualize the example.

The missing link is, I think: you need to create an [Hybrid] field with the "Relational" type set to "Store one value for each Album Artist (auto)". Then go to hybrid albums and set that field to "1" (or "yes", or anything really). You just need to set the value for a single file of each hybrid value and, because it's a relational field, all tracks of the same album will have that same value.

Then Lepa's expression will work - it checks if the [Hybrid] has a value for any given file, and renames the file accordingly.

Hi again lepa and zybex,

First of all thank you for taking the time to help me, I really appreciate it.

The solution that you provided took me awhile to setup but once I figured it out it made sense how it is intended to work. Your solution isn't exactly what I'm trying to achieve though. In my library, the tracks in the album "And the Anonymous Nobody" by De La Soul use two different 'catalog numbers'—in this case they're Qobuz (17 of the tracks) and Kickstarter (1 track). Please see the attached photo. And so I want the album folder to display as "And the Anonymous Nobody (Kickstarter/Qobuz)" rather than "And the Anonymous Nobody (Hybrid)". If there are no possible solutions for what I'm trying to do the [Hybrid] solution will work but I'm hoping there are other options.

(https://i.ibb.co/MZ9mds8/Screenshot-2023-03-19-at-01-28-51.png)
Title: Re: Remove Hung Closing Parenthesis From Renamed Folder
Post by: lepa on March 19, 2023, 02:47:16 am
You could change [hybrid] field editable property from check mark to standard editable. Then you can insert whatever value to that field and display it by changing hard coded Hybrid to field [Hybrid]. So I guess normally you would insert text "Hybrid" or whatever suits you to field [Hybrid] (when album is hybrid type) but in your de la soul you'd set Hybrid field value to be that "Kickstarter/Qobuz"

e.g.


[Album Artist]//trim(replace(replace([Album, 1],[Lossy],),[Incomplete],))/
IfElse(
    Not(IsEmpty([Hybrid,0])),
        / char(40)[Hybrid]char(41),
    Not(IsEmpty([Catalog #,0])),
        / char(40)[Catalog #]char(41),
    1,
)
Title: Re: Remove Hung Closing Parenthesis From Renamed Folder
Post by: AudibleImagery on March 19, 2023, 12:20:55 pm
You could change [hybrid] field editable property from check mark to standard editable. Then you can insert whatever value to that field and display it by changing hard coded Hybrid to field [Hybrid]. So I guess normally you would insert text "Hybrid" or whatever suits you to field [Hybrid] (when album is hybrid type) but in your de la soul you'd set Hybrid field value to be that "Kickstarter/Qobuz"

e.g.


[Album Artist]//trim(replace(replace([Album, 1],[Lossy],),[Incomplete],))/
IfElse(
    Not(IsEmpty([Hybrid,0])),
        / char(40)[Hybrid]char(41),
    Not(IsEmpty([Catalog #,0])),
        / char(40)[Catalog #]char(41),
    1,
)

So is it not possible to automatically (using an expression) list all possible [Catalog #] values for a given album with the [Hybrid] field? The reason why I'm asking is because I have 1000s of "hybrid" albums each with varying catalog numbers and I don't want to have to sift through all of them by hand because it will take weeks.
Title: Re: Remove Hung Closing Parenthesis From Renamed Folder
Post by: lepa on March 19, 2023, 12:48:37 pm
First thought was that these hybrids are anomalies so they could be filled manually.

There is a way but it is getting more complicated and time consuming e.g. by using variables to fill the values. You can search examples where variables are used to calculate e.g. track count of the album and try to modify those to create rule to fill [hybrid]. Create smartlist or view which fills the values or use zybex's ZStats to calculate them in background.

Title: Re: Remove Hung Closing Parenthesis From Renamed Folder
Post by: zybex on March 19, 2023, 05:59:11 pm
In this case [Hybrid] doesn't seem like an adequate name. Perhaps [Album Catalogs]. You can make it a Calculated field with the below expression, but I don't recommend it - since you have thousands of albums it would likely make MC extremely slow.

You can set the value of [Album Catalogs] for all albums in one go with this expression (untested):
FieldQuery(Album Artist (auto),[Album Artist (auto)],Catalog #,1,0)

Or you can use it directly in the Rename expression.

It doesn't seem good to rename the actual files using this though - if you have an album with 10 different Catalog values, then the filename will be veeeery long. But it's your call.
Title: Re: Remove Hung Closing Parenthesis From Renamed Folder
Post by: AudibleImagery on March 21, 2023, 10:03:23 pm
In this case [Hybrid] doesn't seem like an adequate name. Perhaps [Album Catalogs]. You can make it a Calculated field with the below expression, but I don't recommend it - since you have thousands of albums it would likely make MC extremely slow.

You can set the value of [Album Catalogs] for all albums in one go with this expression (untested):
FieldQuery(Album Artist (auto),[Album Artist (auto)],Catalog #,1,0)

Or you can use it directly in the Rename expression.

It doesn't seem good to rename the actual files using this though - if you have an album with 10 different Catalog values, then the filename will be veeeery long. But it's your call.

Hey zybex,

Thank you for offering this as a solution. This new Calculated field seems viable because the most catalog numbers I have for a release is like three. How would I incorporate it into my current renaming expression though?:

Code: [Select]
[Album Artist]//trim(trim(replace(replace([Album, 1],[Lossy],),[Incomplete],)) If(IsEmpty([Catalog #,0]),,char(40)[Catalog #]char(41)))
I don't know how I'm supposed to incorporate it. All of my attempts are resulting in an "Expression Error (Syntax Error)" where the [Album Artist] folder is supposed to be represented in the file path:

(https://ibb.co/j8vmL49)
Title: Re: Remove Hung Closing Parenthesis From Renamed Folder
Post by: zybex on March 22, 2023, 04:37:50 am
The syntax error is likely because I didn't test it and forgot to escape the parenthesis of "Album Artist (auto)". It should be like this:

FieldQuery(Album Artist /(auto/),[Album Artist (auto)],Catalog #,1,0)

Then you can use it like so for renaming, after putting that into an [Album Catalog] calculated field:
[Album Artist]//trim(replace(replace(replace([Album] /([Album Catalog]/),[Lossy],),[Incomplete],),/(/),))

Or, as a combined expression, no extra field required:
[Album Artist]//trim(replace(replace(replace([Album] /(FieldQuery(Album Artist /(auto/),[Album Artist (auto)],Catalog #,1,0)/),[Lossy],),[Incomplete],),/(/),))

Try it in Zelda.
Title: Re: Remove Hung Closing Parenthesis From Renamed Folder
Post by: AudibleImagery on March 23, 2023, 09:24:58 pm
The syntax error is likely because I didn't test it and forgot to escape the parenthesis of "Album Artist (auto)". It should be like this:

FieldQuery(Album Artist /(auto/),[Album Artist (auto)],Catalog #,1,0)

Then you can use it like so for renaming, after putting that into an [Album Catalog] calculated field:
[Album Artist]//trim(replace(replace(replace([Album] /([Album Catalog]/),[Lossy],),[Incomplete],),/(/),))

Or, as a combined expression, no extra field required:
[Album Artist]//trim(replace(replace(replace([Album] /(FieldQuery(Album Artist /(auto/),[Album Artist (auto)],Catalog #,1,0)/),[Lossy],),[Incomplete],),/(/),))

Try it in Zelda.

Hey Zybex,

Is Zelda available on Mac? I downloaded it in an attempt to try the combined expression in Zelda but I'm on Mac and so I don't think I can install it.

The combined renaming expression is of extreme interest to me but when I paste it as is I still get an "Expression Error (Syntax Error)" where the [Album Artist] folder is supposed to be represented in the file path. Could this have something to do with the JRiver for Mac bug that we previously discovered related to using slashes (/) to escape parentheses in renaming expressions?
Title: Re: Remove Hung Closing Parenthesis From Renamed Folder
Post by: zybex on March 24, 2023, 04:09:58 am
No, not available on Mac. The expression is fine, there's no syntax error. It's possible that the forward slashes cause some problem in the Rename&Copy tool in Mac though, it may be a bug. Did you try adding the expression as an Expression column in a Details view? See the screenshot below. If it works as an Expression Column but not on the rename tool, then it's a limitation/bug due to the fwd-slashes, which are also the escape character in an expression. We can try not using the fwd-slash:

Code: [Select]
[Album Artist (auto)]//replace(trim(replace(replace([Album],char(91)Lossychar(93),),char(91)Incompletechar(93),)) char(40)FieldQuery(Album Artist char(40)autochar(41),[Album Artist (auto)],Catalog #,1,0)char(41),char(32)char(40)char(41),)
That's the same as this one, but using no slashes (except the one after [Album Artist (auto)] to create a subfolder):
Code: [Select]
[Album Artist (auto)]//replace(trim(replace(replace([Album],/[Lossy/],),/[Incomplete/],)) /(FieldQuery(Album Artist /(auto/),[Album Artist (auto)],Catalog #,1,0)/),/ /(/),)
You can also try a single slash as the path divider:
Code: [Select]
[Album Artist (auto)]/replace(trim(replace(replace([Album],char(91)Lossychar(93),),char(91)Incompletechar(93),)) char(40)FieldQuery(Album Artist char(40)autochar(41),[Album Artist (auto)],Catalog #,1,0)char(41),char(32)char(40)char(41),)


Title: Re: Remove Hung Closing Parenthesis From Renamed Folder
Post by: zybex on March 24, 2023, 04:11:59 am
@Matt - unrelated bug: on the Rename/Move/Copy Files screen above, clicking the Original or New columns to sort does not work. The sort arrow shows up but the order does not change.
Title: Re: Remove Hung Closing Parenthesis From Renamed Folder
Post by: AudibleImagery on March 27, 2023, 12:21:47 am
No, not available on Mac. The expression is fine, there's no syntax error. It's possible that the forward slashes cause some problem in the Rename&Copy tool in Mac though, it may be a bug. Did you try adding the expression as an Expression column in a Details view? See the screenshot below. If it works as an Expression Column but not on the rename tool, then it's a limitation/bug due to the fwd-slashes, which are also the escape character in an expression. We can try not using the fwd-slash:

Code: [Select]
[Album Artist (auto)]//replace(trim(replace(replace([Album],char(91)Lossychar(93),),char(91)Incompletechar(93),)) char(40)FieldQuery(Album Artist char(40)autochar(41),[Album Artist (auto)],Catalog #,1,0)char(41),char(32)char(40)char(41),)
That's the same as this one, but using no slashes (except the one after [Album Artist (auto)] to create a subfolder):
Code: [Select]
[Album Artist (auto)]//replace(trim(replace(replace([Album],/[Lossy/],),/[Incomplete/],)) /(FieldQuery(Album Artist /(auto/),[Album Artist (auto)],Catalog #,1,0)/),/ /(/),)
You can also try a single slash as the path divider:
Code: [Select]
[Album Artist (auto)]/replace(trim(replace(replace([Album],char(91)Lossychar(93),),char(91)Incompletechar(93),)) char(40)FieldQuery(Album Artist char(40)autochar(41),[Album Artist (auto)],Catalog #,1,0)char(41),char(32)char(40)char(41),)

The first and third expressions didn't return an expression error per se but they are exhibiting some weird behaviors in the Renaming tool. It's returning every catalog number used by an album artist and so this is what the 'Various' album artist value looks like even though there is no catalog number for this release:
(https://i.ibb.co/tJ0QyqY/Screenshot-2023-03-26-at-23-40-05.png)

and here's a single Hawkwind release with a catalog number but it lists every catalog number for any Hawkwind release in my library:
(https://i.ibb.co/Dp26Nvb/Screenshot-2023-03-26-at-23-44-59.png)
Title: Re: Remove Hung Closing Parenthesis From Renamed Folder
Post by: zybex on March 27, 2023, 02:45:48 am
Doh! that's because I don't use MC for audio and am only testing on a small test library with 5 or 6 albums.

The fieldQuery() requires a field that is unique for each album. [Album Artist (auto)] is obviously gonna be the same for many albums, so you get what you're seeing. Let's use [Artist - Album (Year)] instead, which should uniquely identify each album:

Code: [Select]
[Album Artist (auto)]//replace(trim(replace(replace([Album],char(91)Lossychar(93),),char(91)Incompletechar(93),)) char(40)FieldQuery(Artist - Album char(40)yearchar(41),[Artist - Album (year)],Catalog #,1,0)char(41),char(32)char(40)char(41),)
Without those char() functions, that's the same as:
Code: [Select]
[Album Artist (auto)]//replace(trim(replace(replace([Album],[Lossy],),[Incomplete],)) /(FieldQuery(Artist - Album /(year/),[Artist - Album (year)],Catalog #,1,0)/),/ /(/),)
Title: Re: Remove Hung Closing Parenthesis From Renamed Folder
Post by: AudibleImagery on March 28, 2023, 06:20:33 pm
Doh! that's because I don't use MC for audio and am only testing on a small test library with 5 or 6 albums.

The fieldQuery() requires a field that is unique for each album. [Album Artist (auto)] is obviously gonna be the same for many albums, so you get what you're seeing. Let's use [Artist - Album (Year)] instead, which should uniquely identify each album:

Code: [Select]
[Album Artist (auto)]//replace(trim(replace(replace([Album],char(91)Lossychar(93),),char(91)Incompletechar(93),)) char(40)FieldQuery(Artist - Album char(40)yearchar(41),[Artist - Album (year)],Catalog #,1,0)char(41),char(32)char(40)char(41),)
Without those char() functions, that's the same as:
Code: [Select]
[Album Artist (auto)]//replace(trim(replace(replace([Album],[Lossy],),[Incomplete],)) /(FieldQuery(Artist - Album /(year/),[Artist - Album (year)],Catalog #,1,0)/),/ /(/),)

Thank you for your persistence, I feel like we're so close (yet so far) and you've been so patient which I really appreciate.

This new expression is writing catalog numbers to the folder name when there are two or more but deleting the catalog number from the folder name if there's only one catalog number for a given album.

It might also be worth mentioning that I'm still using this custom field to sort my album column:
(https://i.ibb.co/P5Lh1mf/Screenshot-2023-03-28-at-17-34-15.png)
Title: Re: Remove Hung Closing Parenthesis From Renamed Folder
Post by: zybex on March 28, 2023, 06:30:01 pm
Do all files in that album have the same exact value for [artist - album (year)] ?
The expression needs something in common to determine which files being to a given album. You can use just the album name instead, but that will also have problems if you have repeated album names.
Title: Re: Remove Hung Closing Parenthesis From Renamed Folder
Post by: AudibleImagery on March 28, 2023, 06:41:18 pm
Do all files in that album have the same exact value for [artist - album (year)] ?

Yeah they have the same exact value for [artist - album (year)].
Title: Re: Remove Hung Closing Parenthesis From Renamed Folder
Post by: JimH on March 28, 2023, 06:53:31 pm
Look for trailing spaces.  Edit the entire group.
Title: Re: Remove Hung Closing Parenthesis From Renamed Folder
Post by: zybex on March 28, 2023, 07:06:33 pm
It's easier if you attach a screenshot showing a full album with these columns visible:
Artist, album artist, album, album - artist (year), catalog #, ... And other fields you might consider relevant.
Title: Re: Remove Hung Closing Parenthesis From Renamed Folder
Post by: AudibleImagery on March 28, 2023, 07:10:58 pm
Look for trailing spaces.  Edit them as a whole.

No trailing spaces to be found.
Title: Re: Remove Hung Closing Parenthesis From Renamed Folder
Post by: AudibleImagery on March 28, 2023, 07:17:55 pm
It's easier if you attach a screenshot showing a full album with these columns visible:
Artist, album artist, album, album - artist (year), catalog #, ... And other fields you might consider relevant.

Here's a screenshot with the fields you asked for. This is one of the albums in which the newest Renaming expression removed the Catalog number from the folder name:
(https://i.ibb.co/HDPrrdq/Screenshot-2023-03-28-at-18-16-34.png)
Title: Re: Remove Hung Closing Parenthesis From Renamed Folder
Post by: zybex on March 28, 2023, 08:19:45 pm
That's a really bad screenshot, barely readable. Please don't resize them. Is that a forward slash in the [Album] name? If so, I can guess what that does when you put that in the Copy/Rename/Move tool.

Also, does the album only have 2 tracks? This function will look at all tracks in a given album, so it's relevant to see it all to prevent surprises.

Try adding an Expression column to your view with the Expression you're testing, you'll likely see the correct results. It's just when renaming something with slashes that the results change. If so it's a bug that needs to be addressed by the developers.
Title: Re: Remove Hung Closing Parenthesis From Renamed Folder
Post by: AudibleImagery on March 29, 2023, 12:01:52 am
That's a really bad screenshot, barely readable. Please don't resize them. Is that a forward slash in the [Album] name? If so, I can guess what that does when you put that in the Copy/Rename/Move tool.

Also, does the album only have 2 tracks? This function will look at all tracks in a given album, so it's relevant to see it all to prevent surprises.

Try adding an Expression column to your view with the Expression you're testing, you'll likely see the correct results. It's just when renaming something with slashes that the results change. It so it's a bug that needs to be addressed by the developers.

I don't know why the image is so low quality. I didn't resize it. I uploaded to imgbb.com and copied the link over.

There is a forward slash in the album name but I have "Replaces slashes in expressions" checked in the Rename tool. Otherwise slashes creat havoc for me.

It's a 12" and so there are only two tracks.

I'll try the expression in an expression column and follow-up with the results.
Title: Re: Remove Hung Closing Parenthesis From Renamed Folder
Post by: AudibleImagery on April 01, 2023, 12:13:41 am
That's a really bad screenshot, barely readable. Please don't resize them. Is that a forward slash in the [Album] name? If so, I can guess what that does when you put that in the Copy/Rename/Move tool.

Also, does the album only have 2 tracks? This function will look at all tracks in a given album, so it's relevant to see it all to prevent surprises.

Try adding an Expression column to your view with the Expression you're testing, you'll likely see the correct results. It's just when renaming something with slashes that the results change. If so it's a bug that needs to be addressed by the developers.

I added an expression column and did some testing and it seems that the only issue arises with albums titles that have a slash. I have "Replace slashes in expressions" checked because without it my Mac will interpret the slashes in any album titles as new folders and my Renaming situation is a bit of a catch-22. I think I'm going to use the newest expression for the time being and hope that this bug gets patched out in the next update. Nonetheless, thank you for this expression!

The only remaining issue I have regarding the Renaming expression is to do something similar to what we did with Catalog numbers but with the [Date] field. I'd like to chronologically list all possible dates for an album at the beginning of the folder name but if there's more than two dates I'd like to just list the first and last dates separated by a dash as in '1962-1968 - Untamed Hawk', and if there is no date then enter nothing and leave the folder as is. Is this possible?
Title: Re: Remove Hung Closing Parenthesis From Renamed Folder
Post by: zybex on April 01, 2023, 05:13:19 am
Yes, it seems like it's a bug on the handling on slashes on the RMC tool on the Mac. The workaround is to add the code to a new calculated field instead of putting it directly on the rename tool.

Additionally, it sounds like you have albums with different [Date] on its tracks, and that may cause the previous expression to fail in some cases because it was grouping files by Year as well. Try this:

1. Create a calculated field called "Album Artist - Album" with expression:
Code: [Select]
[Album Artist (Auto)] - [Album]
2. Create a calculated field called "Album (renamed)" with expression:
Code: [Select]
save(FieldQuery(Album Artist - Album,[Album Artist - Album],Catalog #,1,0),_catlist)/
save(if(isempty([_catlist]),/(replace([_catlist],;,/,/ )/),), _catalog)/
save(trim(replace(replace(replace([Album],[Lossy],),[Incomplete],),//,_)),_album)/
save(FieldQuery(Album Artist - Album,[Album Artist - Album],Date /(Year/),1,0),_dates)/
save(ifcase(listcount([_dates]),6,2,/[listmath([_dates],0)-listmath([_dates],1)/],1,/[[_dates]/],0,,),_years)/
trim([_years] [_album] [_catalog])

3. On the rename tool, use this expression:
Code: [Select]
[Album Artist (auto)]//[Album (renamed)]
You can add columns for "Album Artist - Album" and "Album (renamed)" to your view to see if they're OK.
Title: Re: Remove Hung Closing Parenthesis From Renamed Folder
Post by: AudibleImagery on April 01, 2023, 06:41:03 pm
Quote
Yes, it seems like it's a bug on the handling on slashes on the RMC tool on the Mac. The workaround is to add the code to a new calculated field instead of putting it directly on the rename tool.

Regarding using a calculated field instead of putting it directly on the rename tool, didn't you say before that this would drastically slow down the UI for a large library such as mine (170,000 songs at 4.4TB)?

Speaking of slowing down a library, I tried to use the newest Rename expression on my entire library to check if there were any files that need to be renamed and the rename tool has been hung for the better part of eight hours now. Can I expect it to eventually work or is it safe for me to assume that JRiver is stuck and needs to be restarted? I'm wondering if the new expression is even usable given the amount of time it's taking to check my library for new renames, which usually takes my library around 20 minutes.

Quote
Additionally, it sounds like you have albums with different [Date] on its tracks, and that may cause the previous expression to fail in some cases because it was grouping files by Year as well. Try this:

I do have albums with different [Date] on some tracks but I want to list these in the folder name in the aforementioned format. Is that what your new proposed expression intends to accomplish? Also would I need to worry about this new expression drastically slowing down my library?
Title: Re: Remove Hung Closing Parenthesis From Renamed Folder
Post by: zybex on April 01, 2023, 08:04:59 pm
Regarding using a calculated field instead of putting it directly on the rename tool, didn't you say before that this would drastically slow down the UI for a large library such as mine (170,000 songs at 4.4TB)?
Only if you use the field in a View, then the view becomes slow, depending on how many files the view is showing at a time.

Quote
Speaking of slowing down a library, I tried to use the newest Rename expression on my entire library to check if there were any files that need to be renamed and the rename tool has been hung for the better part of eight hours now. Can I expect it to eventually work or is it safe for me to assume that JRiver is stuck and needs to be restarted? I'm wondering if the new expression is even usable given the amount of time it's taking to check my library for new renames, which usually takes my library around 20 minutes.
Ouch. 8 hours is too much. I'd say kill it. Fieldquery() is not efficient, but I think that's just hung, not slow. Check if your CPU usage is high or low - if it's low, it's just stuck.

Quote
I do have albums with different [Date] on some tracks but I want to list these in the folder name in the aforementioned format. Is that what your new proposed expression intends to accomplish? Also would I need to worry about this new expression drastically slowing down my library?
The new expression takes care of the dates. I suggest you do a backup of the library, then add the Fields I mentioned and try to use the Rename tool again, but not on too many files in one go. Definitely not on the entire library in a single pass.
Title: Re: Remove Hung Closing Parenthesis From Renamed Folder
Post by: AudibleImagery on April 05, 2023, 06:13:49 pm
Additionally, it sounds like you have albums with different [Date] on its tracks, and that may cause the previous expression to fail in some cases because it was grouping files by Year as well. Try this:

1. Create a calculated field called "Album Artist - Album" with expression:
Code: [Select]
[Album Artist (Auto)] - [Album]
2. Create a calculated field called "Album (renamed)" with expression:
Code: [Select]
save(FieldQuery(Album Artist - Album,[Album Artist - Album],Catalog #,1,0),_catlist)/
save(if(isempty([_catlist]),/(replace([_catlist],;,/,/ )/),), _catalog)/
save(trim(replace(replace(replace([Album],[Lossy],),[Incomplete],),//,_)),_album)/
save(FieldQuery(Album Artist - Album,[Album Artist - Album],Date /(Year/),1,0),_dates)/
save(ifcase(listcount([_dates]),6,2,/[listmath([_dates],0)-listmath([_dates],1)/],1,/[[_dates]/],0,,),_years)/
trim([_years] [_album] [_catalog])

3. On the rename tool, use this expression:
Code: [Select]
[Album Artist (auto)]//[Album (renamed)]
You can add columns for "Album Artist - Album" and "Album (renamed)" to your view to see if they're OK.

Hi again,

Do I need to be concerned about the slashes in the second expression affecting anything due to the Mac slash bug? Also are the first two calculated fields supposed to have the following Data Type, Relational, and Edit Type settings?:
(https://i.ibb.co/T0pJqhZ/Screenshot-2023-04-05-at-17-06-33.png)

The new expression takes care of the dates. I suggest you do a backup of the library, then add the Fields I mentioned and try to use the Rename tool again, but not on too many files in one go. Definitely not on the entire library in a single pass.

I tried the new expression but it's putting '()' at the end of the album title where the catalog number is supposed to be regardless of if there's a catalog number value or not.
Title: Re: Remove Hung Closing Parenthesis From Renamed Folder
Post by: zybex on April 06, 2023, 01:12:31 am
Oops, there was a misplaced comma on the second line, here's the fixed code:
Code: [Select]
save(FieldQuery(Album Artist - Album,[Album Artist - Album],Catalog #,1,0),_catlist)/
save(if(isempty([_catlist]),,/(replace([_catlist],;,/,/ )/)), _catalog)/
save(trim(replace(replace(replace([Album],[Lossy],),[Incomplete],),//,_)),_album)/
save(FieldQuery(Album Artist - Album,[Album Artist - Album],Date /(Year/),1,0),_dates)/
save(ifcase(listcount([_dates]),6,2,/[listmath([_dates],0)-listmath([_dates],1)/],1,/[[_dates]/],0,,),_years)/
trim([_years] [_album] [_catalog])

Leave the field settings as default. Slashes here are not a concern.
Title: Re: Remove Hung Closing Parenthesis From Renamed Folder
Post by: AudibleImagery on April 10, 2023, 12:36:02 pm
Oops, there was a misplaced comma on the second line, here's the fixed code:
Code: [Select]
save(FieldQuery(Album Artist - Album,[Album Artist - Album],Catalog #,1,0),_catlist)/
save(if(isempty([_catlist]),,/(replace([_catlist],;,/,/ )/)), _catalog)/
save(trim(replace(replace(replace([Album],[Lossy],),[Incomplete],),//,_)),_album)/
save(FieldQuery(Album Artist - Album,[Album Artist - Album],Date /(Year/),1,0),_dates)/
save(ifcase(listcount([_dates]),6,2,/[listmath([_dates],0)-listmath([_dates],1)/],1,/[[_dates]/],0,,),_years)/
trim([_years] [_album] [_catalog])

Leave the field settings as default. Slashes here are not a concern.

Hey Zybex,

I tried this new expression and it's not writing a date or a catalog number to the album folder. I tried different combinations and adjusting the expression but I couldn't get it to work.
Title: Re: Remove Hung Closing Parenthesis From Renamed Folder
Post by: zybex on April 10, 2023, 01:54:27 pm
Well, it works for me. I think I can't help any further.
Title: Re: Remove Hung Closing Parenthesis From Renamed Folder
Post by: AudibleImagery on April 13, 2023, 06:44:19 pm
Well, it works for me. I think I can't help any further.

Okay, well thank you for your patience and effort.
Title: Re: Remove Hung Closing Parenthesis From Renamed Folder
Post by: AudibleImagery on May 24, 2023, 06:30:42 pm
Well, it works for me. I think I can't help any further.

Hey Zybex,

I figured out what is causing one of the older expressions (not the newest one) to not write the catalog number for certain files. If the artist field has an artist in addition to the album artist then it won't write the catalog number to the folder name. Does this tell you anything about what the problem might be with the expression or what a possible fix would be? I'd really appreciate a follow-up on this issue because now I have thousands of album folders that are split into two separate folders.

It's doing this behavior with the following code:
Quote
[Album Artist (auto)]//replace(trim(replace(replace([Album],char(91)Lossychar(93),),char(91)Incompletechar(93),)) char(40)FieldQuery(Artist - Album char(40)yearchar(41),[Artist - Album (year)],Catalog #,1,0)char(41),char(32)char(40)char(41),)
Title: Re: Remove Hung Closing Parenthesis From Renamed Folder
Post by: AudibleImagery on May 26, 2023, 07:23:30 pm
Hey Zybex,

I figured out what is causing one of the older expressions (not the newest one) to not write the catalog number for certain files. If the artist field has an artist in addition to the album artist then it won't write the catalog number to the folder name. Does this tell you anything about what the problem might be with the expression or what a possible fix would be? I'd really appreciate a follow-up on this issue because now I have thousands of album folders that are split into two separate folders.

It's doing this behavior with the following code:
Quote
[Album Artist (auto)]//replace(trim(replace(replace([Album],char(91)Lossychar(93),),char(91)Incompletechar(93),)) char(40)FieldQuery(Artist - Album char(40)yearchar(41),[Artist - Album (year)],Catalog #,1,0)char(41),char(32)char(40)char(41),)


Any thoughts?