INTERACT FORUM

More => Old Versions => JRiver Media Center 23 for Mac => Topic started by: pillshovel on November 09, 2017, 04:36:43 pm

Title: File naming for albums that begin with "." on a Mac resulting in hidden folders.
Post by: pillshovel on November 09, 2017, 04:36:43 pm
On OS-X any folder that starts with a "." is hidden.  I have a few albums that this affects.  Example: When I use MC23 to rename the files on the Kyuss album ...And the Circus Leaves Town, it results in a hidden folder so then no other software can see the files.  Would it be possible to have MC automatically replace the ... with _.. or something similar (this is how iTunes gets around it)?
Title: Re: File naming for albums that begin with "." on a Mac resulting in hidden folders.
Post by: Awesome Donkey on November 10, 2017, 07:26:22 am
This is common with Mac and Linux.

I use the Rename, Move, & Copy Files tool with this directories rule;

Code: [Select]
[Album Artist]\regex([Album], /#^(\.*)(.*?)(\.*)$#/, -1)replace([R1],.,_)[R2]replace([R3],.,_)
The rule above, e.g. the [Album Artist]\ part can be changed/customized to whatever your desired setup is but the regex part for Album is what's needed here. Keep in mind, I run the above on all my new imported files (all previous files already had this ran on them) on Windows since Windows doesn't hide folders starting with a period by default. I assume if you can view hidden folders in Finder (and thus MC) it can be ran this way too, not sure.

Ultimately with the above, a cross platform library (Windows, Mac and Linux in my case) works great but it'll work great too if you're using Mac or Linux and have albums like the one you posted above that begins with a period. :)
Title: Re: File naming for albums that begin with "." on a Mac resulting in hidden folders.
Post by: RD James on November 10, 2017, 09:33:40 am
If I recall correctly, [option] + [;] results in the proper ellipsis character … rather than using periods.
It would be great if there was some easy way to set up a replacement table in MC rather than using complex expressions.
Title: Re: File naming for albums that begin with "." on a Mac resulting in hidden folders.
Post by: pillshovel on November 10, 2017, 10:46:31 am
This is common with Mac and Linux.

I use the Rename, Move, & Copy Files tool with this directories rule;

Code: [Select]
[Album Artist]\regex([Album], /#^(\.*)(.*?)(\.*)$#/, -1)replace([R1],.,_)[R2]replace([R3],.,_)
The rule above, e.g. the [Album Artist]\ part can be changed/customized to whatever your desired setup is but the regex part for Album is what's needed here. Keep in mind, I run the above on all my new imported files (all previous files already had this ran on them) on Windows since Windows doesn't hide folders starting with a period by default. I assume if you can view hidden folders in Finder (and thus MC) it can be ran this way too, not sure.

Ultimately with the above, a cross platform library (Windows, Mac and Linux in my case) works great but it'll work great too if you're using Mac or Linux and have albums like the one you posted above that begins with a period. :)

Thank you, I will try that tonight and see if it fixes my issue. 
Title: Re: File naming for albums that begin with "." on a Mac resulting in hidden folders.
Post by: pillshovel on November 10, 2017, 10:48:48 am
If I recall correctly, [option] + [;] results in the proper ellipsis character … rather than using periods.
It would be great if there was some easy way to set up a replacement table in MC rather than using complex expressions.

That's actually what I was hoping for...to be able to set it up to automatically take care of this internally.
Title: Re: File naming for albums that begin with "." on a Mac resulting in hidden folders.
Post by: pillshovel on November 10, 2017, 10:15:53 pm
This is common with Mac and Linux.

I use the Rename, Move, & Copy Files tool with this directories rule;

Code: [Select]
[Album Artist]\regex([Album], /#^(\.*)(.*?)(\.*)$#/, -1)replace([R1],.,_)[R2]replace([R3],.,_)
The rule above, e.g. the [Album Artist]\ part can be changed/customized to whatever your desired setup is but the regex part for Album is what's needed here. Keep in mind, I run the above on all my new imported files (all previous files already had this ran on them) on Windows since Windows doesn't hide folders starting with a period by default. I assume if you can view hidden folders in Finder (and thus MC) it can be ran this way too, not sure.

Ultimately with the above, a cross platform library (Windows, Mac and Linux in my case) works great but it'll work great too if you're using Mac or Linux and have albums like the one you posted above that begins with a period. :)

Maybe I did something wrong, but I tried the expression above and it didn't work. 

Here is a screenshot of what it did so that someone might be able to help.
Title: Re: File naming for albums that begin with "." on a Mac resulting in hidden folders.
Post by: pillshovel on November 10, 2017, 10:55:14 pm
I'm not sure if there is a problem doing it this way, but I played around with things and read a lot.

The following rule seems to fix that one single problem.  Please let me know if I'm missing something doing it this way.

[Artist]/removecharacters([Album], ., 1)


Edit:

I tried this rule "[Artist]/replace([Album], ..., _..)" which gave me results closer to what I wanted but this doesn't fix albums that have a single "." at the beginning.  Can someone help me put these two things together?  I have learned all I can tonight and need to get to bed.
Title: Re: File naming for albums that begin with "." on a Mac resulting in hidden folders.
Post by: pillshovel on November 20, 2017, 07:57:31 am
Anybody know of a better way to do this?  Or could anyone help me figure out what I did wrong with the first suggestion?
Title: Re: File naming for albums that begin with "." on a Mac resulting in hidden folders.
Post by: Awesome Donkey on November 20, 2017, 08:08:18 am
My expression above does work with the Rename, Move, & Copy Files tool. However it works best if you run it on your library from Windows (since it doesn't treat folders/files that begin with a period as hidden). It's worth noting that I've never attempted to run the expression from Mac or Linux so there's a chance it may not work there (looking at it, it's likely it doesn't possibly due to the slashes and/or differences in paths between Windows and Mac/Linux).

You might need to enable viewing hidden files in Mac's Finder app, go into your library of files and manually remove any periods at the beginning of the album folders yourself (then run MC's auto import again since the folder names will change). It's a bit of a pain, but it can be done.
Title: Re: File naming for albums that begin with "." on a Mac resulting in hidden folders.
Post by: pillshovel on November 20, 2017, 09:44:28 am
Thanks...I'll give it another shot.