IPB

Welcome Guest ( Log In | Register )

> Notice!

Please take a minute to check our Frequently Asked Questions. Use Search to reveal possible related topics.

Also make sure you've read the Forum Guidelines before posting in this forum.

> Remove Part of the File name, after the "-"
monet60707
post Jan 20 2012, 05:08
Post #1


Member


Group: Members
Posts: 4
Joined: 20-January 12
Member No.: 15931
Mp3tag Version: 2.49b



Hi,

Can you help me with Regular Expressions? I want to remove part of the file name after the dash "-" e.g. Depeche Mode - People Are People should become just Depeche Mode. I figured out the way to do it with single words e.g. Europe - Carrie (becomes Europe) but it does not work with 2-worded bands.
And also how would i do it the other way around, meaning to remove the band before the "-" but leave the song title (e.g. Depeche Mode - People Are People should become just People Are People)?
Any help is much appreciated.

Peter J.
Go to the top of the page
 
+Quote Post
 
Start new topic
Replies (1 - 5)
ohrenkino
post Jan 20 2012, 06:57
Post #2


Member


Group: Full Members
Posts: 4962
Joined: 9-December 09
From: Norddeutschland / Northern Germany
Member No.: 11458
Mp3tag Version: 2.66



ZITAT(monet60707 @ Jan 20 2012, 05:08) *
Hi,

Can you help me with Regular Expressions? I want to remove part of the file name after the dash "-" e.g. Depeche Mode - People Are People should become just Depeche Mode. I figured out the way to do it with single words e.g. Europe - Carrie (becomes Europe) but it does not work with 2-worded bands.
And also how would i do it the other way around, meaning to remove the band before the "-" but leave the song title (e.g. Depeche Mode - People Are People should become just People Are People)?
Any help is much appreciated.

Peter J.

Use the converter "Filename - FIlename".
Enter as mask for the original filename:
%1 - %2
Enter as mask for the target filename (if you want to keep the first part):
%1
Enter as mask for the target filename (if you want to keep the second part):
%2

The Preview function in the dialogue should give you a hint whether the mask fits.


--------------------
42 - wie war die Frage / what was the question / comment était la question
Go to the top of the page
 
+Quote Post
monet60707
post Jan 20 2012, 18:06
Post #3


Member


Group: Members
Posts: 4
Joined: 20-January 12
Member No.: 15931
Mp3tag Version: 2.49b



QUOTE (ohrenkino @ Jan 20 2012, 00:57) *
Use the converter "Filename - FIlename".
Enter as mask for the original filename:
%1 - %2
Enter as mask for the target filename (if you want to keep the first part):
%1
Enter as mask for the target filename (if you want to keep the second part):
%2

The Preview function in the dialogue should give you a hint whether the mask fits.


Thanx ohrenkino!

It does the trick for me. Really appreciate you taking the time to solve this.
Go to the top of the page
 
+Quote Post
Steve Holiday
post Jan 21 2012, 20:34
Post #4


Member


Group: Full Members
Posts: 23
Joined: 5-January 12
From: Denver, CO
Member No.: 15848
Mp3tag Version: 2.54



QUOTE (monet60707 @ Jan 20 2012, 10:06) *
Thanx ohrenkino!

It does the trick for me. Really appreciate you taking the time to solve this.



On a similar note can I do something similar for a tag field, such as album?
Obviously I can do a regular Exp, but didn't want to miss something simpler like above.

For example I have Album with something like this:

Year - Conductor - Album Name

I want to convert it to JUST the album name and get rid of the "Year - Conductor - " part.

Thanks!!!!!!!!!!!!!

I was using GUESS VALUES with

%album%
to
%year% - %conductor% - %album%

----

What I didn't like is that it replaced my year and conductors with that, I'd rather keep my values, I was hoping for something like %dummy% - %dummy% - %album%.

thanks.

This post has been edited by Steve Holiday: Jan 21 2012, 20:41
Go to the top of the page
 
+Quote Post
ohrenkino
post Jan 21 2012, 20:43
Post #5


Member


Group: Full Members
Posts: 4962
Joined: 9-December 09
From: Norddeutschland / Northern Germany
Member No.: 11458
Mp3tag Version: 2.66



ZITAT(Steve Holiday @ Jan 21 2012, 20:34) *
On a similar note can I do something similar for a tag field, such as album?
Obviously I can do a regular Exp, but didn't want to miss something simpler like above.

For example I have Album with something like this:

Year - Conductor - Album Name

I want to convert it to JUST the album name and get rid of the "Year - Conductor - " part.

Thanks!!!!!!!!!!!!!

I am afraid not.
Or - you could do a "Replace with Regular Expression"
Input-Mask:
.* - (.*)
Replace string:
$1
This should get rid of everything up to the last hyphen.


--------------------
42 - wie war die Frage / what was the question / comment était la question
Go to the top of the page
 
+Quote Post
Steve Holiday
post Jan 21 2012, 21:40
Post #6


Member


Group: Full Members
Posts: 23
Joined: 5-January 12
From: Denver, CO
Member No.: 15848
Mp3tag Version: 2.54



QUOTE (ohrenkino @ Jan 21 2012, 12:43) *
I am afraid not.
Or - you could do a "Replace with Regular Expression"
Input-Mask:
.* - (.*)
Replace string:
$1
This should get rid of everything up to the last hyphen.



Great one!! Very simple, thanks so much.

Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 18th December 2014 - 09:30