#1 2008-04-16 13:04

albe
Member
Registered: 2008-04-16
Posts: 2

Swap parts and space out words

Hi All,

First of all must thank Denis for a splendid program. Am a new user but already the program is indispensable.

Secondly would much appreciate any help on the following:

I have many hundreds of mp3 files (within various sub folders) the names of which are made up of Song Title_Artist.mp3 (e.g. Help_Beatles.mp3). What I like to do is to
batch change them around to Artist - Song Title.mp3 (Artist space Dash space Song Title.mp3, eg Beatles - Help.mp3). Can this be done and if so, how?

Many thanks
albe

Offline

#2 2008-04-16 14:43

krtek
Senior Member
From: Łódź (Poland)
Registered: 2008-02-21
Posts: 262

Re: Swap parts and space out words

Hi,
If it's always one and only one "_" sign which separates Title from Artist you can use RegEx Rule.

Expression: (.+)_(.+)
Replace: $2 - $1

Skip extention.

Well, that's one of the easiest problems you can solve with ReNamer :-D
Wanna know more about Regular Expressions -> see ReNamer manual or RegEx tutorial.


Regular Expressions are not as hard to understand as you may think. Check ReNamer's manual or nice Regular Expressions tutorial for more info and start to use full power of applications that use them (like ReNamer, Mp3Tag and so on).

Offline

#3 2008-04-16 14:53

eR@SeR
Senior Member
From: Земун, Србија
Registered: 2008-01-23
Posts: 353

Re: Swap parts and space out words

Hi and welcome albe smile

Your "demand" is like mine naming for mp3s including rule "Capitalize Every Word".

It is possible to do what you wanted...but I can help you just for the first part and that is:
Add Replace rule, Find "_", replace "spacedashspace". Now you can set would it be "all", "first" or "last" in the filename depending of words like Beatles_Let_It_Be.mp3. If is this case, then you set it to be the "first" then you can add CleanUp rule and check "_" character.

Second part will be to add RegEx rule which, unfortunately, I can't help you because I don't know how to use it sad. You can read in user manual (page 16) or you can go to www.regular-expresions.info for more details. Good luck wink

Last edited by eR@SeR (2008-04-16 14:54)


TRUTH, FREEDOM, JUSTICE and FATHERLAND are the highest morale values which human is born, lives and dies for!

Offline

#4 2008-04-16 14:58

eR@SeR
Senior Member
From: Земун, Србија
Registered: 2008-01-23
Posts: 353

Re: Swap parts and space out words

Nice work krtek big_smile. You were faster than me tongue. Unfortunately, I can't understand RegEx but I'll try to overcome...


TRUTH, FREEDOM, JUSTICE and FATHERLAND are the highest morale values which human is born, lives and dies for!

Offline

#5 2008-04-16 15:00

krtek
Senior Member
From: Łódź (Poland)
Registered: 2008-02-21
Posts: 262

Re: Swap parts and space out words

eR@SeR wrote:

Second part will be to add RegEx rule which, unfortunately, I can't help

He he,
I was 10 mins faster big_smile.
And the best thing about RegEx's is that you need only one step.
Cheers.

Ps. And now you were quicker :-D

Last edited by krtek (2008-04-16 15:51)


Regular Expressions are not as hard to understand as you may think. Check ReNamer's manual or nice Regular Expressions tutorial for more info and start to use full power of applications that use them (like ReNamer, Mp3Tag and so on).

Offline

#6 2008-04-16 15:04

eR@SeR
Senior Member
From: Земун, Србија
Registered: 2008-01-23
Posts: 353

Re: Swap parts and space out words

Heh you right. This rule is really powerful. Thanks for sharing knowledge wink. Cheers big_smile


TRUTH, FREEDOM, JUSTICE and FATHERLAND are the highest morale values which human is born, lives and dies for!

Offline

#7 2008-04-16 15:19

eR@SeR
Senior Member
From: Земун, Србија
Registered: 2008-01-23
Posts: 353

Re: Swap parts and space out words

Can somebody help me about this state?

WideCharUpper, WideCharLower ---> to be like Wide Char Upper, Wide Char Lower

Script or RegEx whatever. Thanks is advance big_smile


TRUTH, FREEDOM, JUSTICE and FATHERLAND are the highest morale values which human is born, lives and dies for!

Offline

#8 2008-04-16 16:03

albe
Member
Registered: 2008-04-16
Posts: 2

Re: Swap parts and space out words

Hi All,

Thanks Krtek and everybody else. Absolute stars.
I can see that I'll have to learn RegEx to unleash the full power of the program.

Many thanks again for the help.

Offline

#9 2008-04-16 16:16

krtek
Senior Member
From: Łódź (Poland)
Registered: 2008-02-21
Posts: 262

Re: Swap parts and space out words

eR@SeR wrote:

WideCharUpper, WideCharLower ---> to be like Wide Char Upper, Wide Char Lower

First I thought that Regex's won't do that (at least not in nice and clean way, no matter how many words you'll have in a row). But they're better than I thought big_smile .

Here you go:
Expression: "([A-Z])([a-z]+)"
Replace: "$1$2 "  -> note the space at the end

All you have to do is tick CaseSensitive (without that it won't work).
And add second rule to delete the space at the very end.

See you soon eR@SeR!


Regular Expressions are not as hard to understand as you may think. Check ReNamer's manual or nice Regular Expressions tutorial for more info and start to use full power of applications that use them (like ReNamer, Mp3Tag and so on).

Offline

#10 2008-04-16 17:05

eR@SeR
Senior Member
From: Земун, Србија
Registered: 2008-01-23
Posts: 353

Re: Swap parts and space out words

Who knows what else you can do with RegEx tongue

Everything you said is correct, but I think that there is a better solution for this situation. Of course I don't know it, but we will see what others have to say.

Anyway, nice work and thank you for such fast respond smile. Keep going in that direction big_smile.
I'll try too roll


TRUTH, FREEDOM, JUSTICE and FATHERLAND are the highest morale values which human is born, lives and dies for!

Offline

Board footer

Powered by FluxBB