Karaoke files, how to reverse artist/track format?

Advanced Renamer forum
#1 : 08/12-17 10:17
Doug Brown
Doug Brown
Posts: 2
Hi there
It seems this program could be an elegant solution to my problem - if I can figure out how to apply it!
My (numerous) files are cdg/mp3 files, with matching details apart from the extensions - viz:
Number - Artist - Title.cdg
Number - Artist - Title.mp3
I tried the swap method function, but found the two separators in the filename seemed to throw up unexpected results - with the number getting moved around too - which I think I understand why...?
So I wondered if a regular expression can be applied somehow in the move function to swap the Artist & Name ?
Or another solution?
I have only a cursory amount of experience with regular expressions, so directions would be much appreciated.
Thanks
Doug


08/12-17 10:17
#2 : 08/12-17 11:48
Stefan
Stefan
Posts: 274
Reply to #1:
What is the main question?

FROM:
Number - Artist - Title.cdg
Number - Artist - Title.mp3

TO:
Number - Title - Artist.cdg
Number - Title - Artist.mp3

Match everything up to first hyphen, then all till second hyphen, then the rest?
Re-order as first match, third match, second match.

???



If 'Yes' then try

https://www.advancedrenamer.com/user_guide/metho d_replace

search: (.+) - (.+) - (.+)
replace: \1 - \3 - \2
[x]RegEx
apply to name



HTH?


08/12-17 11:48
#3 : 09/12-17 10:11
Doug Brown
Doug Brown
Posts: 2
Reply to #2:
Yes - THH!
Precise, elegant and just the tip of the iceberg.
30 years too late for me to start realising the full potential of regular expressions.
But I now have a licence so who knows ...
Thanks
Doug


09/12-17 10:11