More > JRiver Media Center 23 for Mac

File naming for albums that begin with "." on a Mac resulting in hidden folders.

<< < (2/2)

pillshovel:

--- Quote from: 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: ---[Album Artist]\regex([Album], /#^(\.*)(.*?)(\.*)$#/, -1)replace([R1],.,_)[R2]replace([R3],.,_)
--- End code ---

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. :)

--- End quote ---

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.

pillshovel:
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.

pillshovel:
Anybody know of a better way to do this?  Or could anyone help me figure out what I did wrong with the first suggestion?

Awesome Donkey:
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.

pillshovel:
Thanks...I'll give it another shot.

Navigation

[0] Message Index

[*] Previous page

Go to full version