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.

 
Reply to this topicStart new topic
> Remove parenthetical phrase from filename?
Praxis
post Aug 17 2005, 20:35
Post #1


Member


Group: Full Members
Posts: 11
Joined: 17-August 05
Member No.: 2060
Mp3tag Version: 2.32



This is a great program, and one of a handfull of programs keeping me booting Windows on a regular basis. It beats Linux Easytag with a hammer.

Anyway, I'm wondering what the best way to remove a phrase that is in parenthesis from a Filename might be.

I make my filename out of various tag elements like:
%artist% - $num(%track%,2) - %title% - %album%

However the Title often has some additional information in paranthesis that I don't want to be part of the Filename for two reasons:
1) I'm trying to keep file names less than 64 characters so I can make CDs to play on my portable MP3 CD player.
2) I understand CD-Rs do not appreciate parenthesis in any case.

But I would like to keep the parenthetical information in the track Title so it displays when I play the song (my player displays Artist - Title).

Otherwise I'd just do a Filename->Tag conversion and send the parenthetical expression to the Comment field, then rename the file with Tag->Filename.

I have an inelegant way of dealing with this now. I simply manually edit the filenames in cases where not many files in an album have parenthetical clauses. In other cases I run a Replace action that converts "(" in to "- ", then I can wipe the expression from the Filename by running a Filename->Filename conversion using something like this:
%1 - %2 - %3 - %4 - %5
%1 - %2 - %3 - %5

I searched through the English Support forum, but didn't find any suggestions. Leider, ich spreche Deutsch wie ein Eingeboren - aus Madagascar.

Thanks,
Go to the top of the page
 
+Quote Post
Sebastian Mares
post Aug 17 2005, 20:56
Post #2


Moderator


Group: Full Members
Posts: 2275
Joined: 15-June 03
From: Bad Herrenalb
Member No.: 496
Mp3tag Version: 2.59a



Do a RegEx replace on the filename using \s*\(.*\) as match and nothing as replace.


--------------------
There are 10 types of people in this world: those who understand binary, and those who don't.
Go to the top of the page
 
+Quote Post
Praxis
post Aug 18 2005, 05:05
Post #3


Member


Group: Full Members
Posts: 11
Joined: 17-August 05
Member No.: 2060
Mp3tag Version: 2.32



Thanks, Sebastian, that did the trick. Now I just have to figure out why so I can learn a bit more about regular expressions. blink.gif
Go to the top of the page
 
+Quote Post
Sebastian Mares
post Aug 18 2005, 08:41
Post #4


Moderator


Group: Full Members
Posts: 2275
Joined: 15-June 03
From: Bad Herrenalb
Member No.: 496
Mp3tag Version: 2.59a



QUOTE (Praxis @ Aug 18 2005, 06:05)
Thanks, Sebastian, that did the trick.  Now I just have to figure out why so I can learn a bit more about regular expressions.  blink.gif
*


\s* matches any number of spaces.
\( matches a bracket (the charecter has to be escaped or otherwise MP3Tag thinks that it's the beginning of a group).
.* matches any number of characters
\) matches a bracket.

So basically, we are looking for spaces folowed by a bracket followed by characters followed by an ending bracket. All this is replaced by nothing.

This post has been edited by Sebastian Mares: Aug 18 2005, 08:41


--------------------
There are 10 types of people in this world: those who understand binary, and those who don't.
Go to the top of the page
 
+Quote Post
Praxis
post Aug 18 2005, 18:15
Post #5


Member


Group: Full Members
Posts: 11
Joined: 17-August 05
Member No.: 2060
Mp3tag Version: 2.32



QUOTE (Sebastian Mares @ Aug 18 2005, 00:41)
\s* matches any number of spaces.
\( matches a bracket (the charecter has to be escaped or otherwise MP3Tag thinks that it's the beginning of a group).
.* matches any number of characters
\) matches a bracket.

So basically, we are looking for spaces folowed by a bracket followed by characters followed by an ending bracket. All this is replaced by nothing.
*


Thanks again, a book on the wish list should be Amazon.deing its way to MP3Tag as I type (seemed easier than messing with PayPal, since I don't have an account). Hopefully I navigated the German menus properly.

I fooled around with the RegEx stuff before I posted, but didn't quite get the syntax right on my own. I didn't use the '\s*' to find blank spaces and tried both '*' & '*.*' between the escaped paranthesis brackets, but it didn't seem to work properly.
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: 24th October 2014 - 12:16