Reversing complex group-artist mp3 naming

A swapping-ground for Regular Expression syntax

Reversing complex group-artist mp3 naming

Postby mrvelous01 » Mon Jun 01, 2009 11:12 pm

Hello. I'm relatively new to regular expressions and have taken a few shots at this, but can't seem to get it right. I have also reviewed the posts on this forum but did not find any examples that really applied.

I have several dozen files (mp3's) that have the format "song title - the artist name.mp3" and I want to rename them "artist name - song title.mp3". The primary problem I have with capturing the individual expressions is that the song title and the artist names vary with the number of words before and after the hyphen. Here are a few examples. Thanks in advance for your help.

From:
Tenessee Christmas - Alabama.mp3
25 Or 6 To 4-Chicago.mp3

To:
Alabama-Tenessee Christmas.mp3
Chicago-25 Or 6 To 4.mp3
mrvelous01
 
Posts: 2
Joined: Mon Jun 01, 2009 10:45 pm

Re: Reversing complex group-artist mp3 naming

Postby mrvelous01 » Tue Jun 02, 2009 12:24 am

Sorry, the title of the posting should have been "Reversing complex title-artist mp3 naming :)
mrvelous01
 
Posts: 2
Joined: Mon Jun 01, 2009 10:45 pm

Re: Reversing complex group-artist mp3 naming

Postby GMA » Tue Jun 02, 2009 6:43 am

Hi, mrvelous01:
This is what you need:

1. Set RegEx (1) as:
MATCH: (.*?)-(.*)
REPLACE: \2 - \1

2. In the Remove (5) field, check "Trim" (that'll remove any spaces left at the beginning of the file name).

3. Use the preview to see if everything's OK, and then press "Rename".

One thing; if there's no space before/after the hyphen (e.g.: "Title-Artist") it will be added as a result of the renaming process (e.g.: "Artist - Title"), which may or may not be a problem for you. If that IS a problem, then you're gonna have to use two different RegExs.
Cheers,

Gabriel.
GMA
 
Posts: 91
Joined: Sun Dec 02, 2007 1:30 pm
Location: Argentina

Re: Reversing complex group-artist mp3 naming

Postby trikeryder » Wed Aug 20, 2014 4:36 am

How about a 3 part title?

01 - Bottoms Up - Brantley Gilbert
01 - Brantley Gilbert - Bottoms Up

Regards,
Dave
trikeryder
 
Posts: 4
Joined: Wed Aug 20, 2014 4:32 am

Swap title - artist first name last name reorder rearrange

Postby Stefan » Wed Aug 20, 2014 8:32 am

FROM:
01 - Bottoms Up - Brantley Gilbert.ext

TO:
01 - Brantley Gilbert - Bottoms Up.ext

USE:
RegEx(1)
Search: (.*) - (.*) - (.*)
Replace: \1 - \3 - \2
[ ] Include Ext. un-checked




 
Stefan
 
Posts: 736
Joined: Fri Mar 11, 2005 7:46 pm
Location: Germany, EU

Re: Reversing complex group-artist mp3 naming

Postby trikeryder » Tue Aug 26, 2014 10:55 am

Thanks Stefan. Works great.

Anywhere I can find some guidelines to use this program :?:
trikeryder
 
Posts: 4
Joined: Wed Aug 20, 2014 4:32 am

Help howto how-to explanations guidelines to use this progra

Postby Stefan » Tue Aug 26, 2014 11:41 am

trikeryder wrote:Anywhere I can find some guidelines to use this program


Yes, there is a help file with each download as CHM (and also downloadable as PDF http://www.bulkrenameutility.co.uk/Download.php)
Then it helps me to read such support forums from back to start to get used to an application.
Next is to learn the regular expressions syntax. There is a lot of help in the internet (also see last post of first thread in this sub forum too)













Please wait a few seconds then submit. Thank you.
 
Stefan
 
Posts: 736
Joined: Fri Mar 11, 2005 7:46 pm
Location: Germany, EU

Re: Reversing complex group-artist mp3 naming

Postby trikeryder » Mon Sep 01, 2014 2:31 am

Been out of the syntax end of things since 3.1... :?

Appreciate the assistance.
trikeryder
 
Posts: 4
Joined: Wed Aug 20, 2014 4:32 am

Re: Reversing complex group-artist mp3 naming

Postby trikeryder » Sun Oct 12, 2014 11:17 pm

After looking through the guide on this program, didn't seem to find a command to change a file name from:

01 - Brantley Gilbert - Bottoms Up.ext

TO:

01 - Gilbert, Brantley - Bottoms Up.ext


Even if I need to do it in 2 steps, I have many files I would like to switch.

Any assistance?

Regards,
Dave
trikeryder
 
Posts: 4
Joined: Wed Aug 20, 2014 4:32 am

Re: Revers swap group - artist mp3 order add comma

Postby Stefan » Mon Oct 13, 2014 6:58 am

trikeryder wrote:After looking through the guide on this program,
didn't seem to find a command to change a file name from:

That's normal. If you buy a hammer, there's no help how to use it. You have to experiment and think yourself about possible uses.

FROM:
01 - Brantley Gilbert - Bottoms Up.ext
TO:
01 - Gilbert, Brantley - Bottoms Up.ext

Rule:
- match digits (1), - ,first word (2), second word (3), - ,rest of string (4).
- replace with digits (\1), - ,second word (\3), add a comma, first word (\2), - ,rest of string (\4).

With BRU we can do this by utilizing regular expressions.

USE:
RegEx(1)
Search: (.*?) - (.*?) (.*) - (.*)
Replace: \1 - \3, \2 - \4


You can find more examples in the forum if you search e.g. for 'swap'
Stefan
 
Posts: 736
Joined: Fri Mar 11, 2005 7:46 pm
Location: Germany, EU


Return to Regular Expressions