SongKong Jaikoz

SongKong and Jaikoz Music Tagger Community Forum

Cross platform renaming scheme

Hello,

First of all, like almost all people there I am very happy about Jaikoz. It is a very powerful and useful tool for MP3 sorting.

Nevertheless I have a question regarding the cross platform file renaming.
I am currently sorting my collection on an ubuntu box, and I listen mainly them under windows. Unfortunately there are less restriction in linux regarding file names compared to windows ( - and maybe mac ?).

I saw that some persons had issues with folder separator in file/folder names, but thx to javascript, I was already able to fix that by doing the following:
x.replace(folderseparator, ‘-’) where x stand for artist, album, title…

But for the other characters, I think it may be a pain doing like that.

I think I can use the replace From to To capability in order to define the set of invalid characters for file/folder names, am I wrong ?

I may suggest another option in that preference tab:
Replace non-cross plateform characters by [user choice]

Thank you already for your answer, and again good job.

Right I think the problem with your idea is ‘That replace non-platform characters’ when running Jaikoz on an ubunto box would replace characters that are invalid for ubunto but you want to replace characters that are invalid on Windows but Jaikoz has no idea you want to use WIndows.

However Preferences:File and Folder Correct : File and Folder Naming : Replace From Character With To Character should do what you want

Well, I was more thinking about a “replace all character not eligible for file/folder name whatever the platform”.

Right, how many are there ?

I couldnt really understand your example as you seemed to be replacing a folderseperator with ‘-’ , but folderseparator variable is only valid at the subfolder level and is correctly converted for whatever platform you are on.

Here is my problem with separator.

I used this following rename mask for folder structure before introducing the .replace(folderseparator,):

[i](albumartist.length>0 ? albumartist + folderseparator : (artist.length>0 ? artist + folderseparator : ‘’))

  • ‘[’ + year + ‘]’ + ’ - ’ + album + (disctotal > 1 ? folderseparator + 'Disc ’ + discno : ‘’)[/i]

For AC/DC band for example, when renaming, it creates 2 folder AC, then DC.
Because the folder separator in linux is /

In previous version I knew that it simply drop that / character in the artist name. This is basically the reason why I use the javascript replace feature.

For the non-cross platform characters, I identified the following set:
< > : " | ? *
And of course the \ and / (OS folder separator)
I use the character replacement list in order to handle that set of characters. (Tab: File And Folder Correct/File And Folder Renaming)

I hope that now you have a better understanding of my issues.

Thanks I understand you now, but it seems that you have an adequate solution anyway now.