SongKong Jaikoz

SongKong and Jaikoz Music Tagger Community Forum

Applying an appended tag to 'Rename Folder from Metadata'

Hi all,

I’m wondering if ‘rename mask’ code exists for appending a selected tag to become the name of the folder in ‘Rename Folder from Metadata’

Here is my scenario:

I am organizing the folder structure to my entire collection based on genre. My genre tagging system lists the general genre with a series of sub-genre codes in the same field.

EG: House [deep][soulful]

Ideally I’m trying to develop an organizational system that houses all the tracks tagged as “House” into one folder with the sub-genres as their own folders within.

EG: Base Folder/House/[deep][soulful]/Track XX

or even more simply: Base Folder/House/Track XX

I do realize that I can tag the sub-genres in a separate field and include this in the mask, but most of my fields are already being used in the DJ software workflow that I am using as it has a limited list of ID3 tags visible to the user.

Any help would be greatly appreciated.

Thanks!
Erik

So are you saying your Genre field currently contains values such as

So is the format

If it is then yes you should be able to use Javascript expressions to split the genre field into two parts and use each part for a different subfolder in your Preferences:File and Folder Correct:Rename Folder from Metadata
masks.

Because the format is Javascript Expressions you can use any Javsscript reference to work out how to do it.

This is how my genre field typically looks, correct.

Are there any risks in splitting the genre field in 2 parts? Would it introduce unexpected behavior from media players reading that tag?

My coding background is pretty limited btw.

I suppose I could always have the genre folder names reflect the subgenres as well, although it would yield 1000s of folders considering that I like to be very specific in the subgenre field.

Id be interested to know if any other users utilize this type of structure.

I use a similar setup for my folders and the problem i run in to is if the tags are empty or missing you end up with a lot of empty square brackets in your folder names, ex. [] []. Especially going to be a problem for you if you are going to use that for your actual sub-folders with multiple albums under it, you might end up with a lot of albums under folder named \[]\.

What we really need is (and I’m sure its possible, just don’t know how) is a If Not Empty, Then type of statement.

Hi chiillware that is what the ifnotempty function is for do you want to post your mask and I will try and sort them both out later.

Okay this seems to work, just paste into Rename mask (and compilation mask) on the Rename Folder from Metadata

if(genre.length > 0)
{
  if(genre.indexOf('[')>0)
  { 
      genre.substring(0,  genre.indexOf('[') ) + folderseparator  + genre.substring(genre.indexOf('[') )  \t\t  \t\t
  }
 else
  {
     genre + folderseparator 
  } 
}
else
{
}

I think its self explanatory but basically if the genre field is not empty and contains a ‘[’ its splits the genre field at this point and uses it to create two folders. If the genre field is not empty but doesnt contain a ‘[’ then it uses the whole field as a a single folder so you dont end up with empty[] folders