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
> create a filename with optional portions
Prorok Rak
post Mar 21 2012, 16:03
Post #1


Member


Group: Members
Posts: 4
Joined: 21-March 12
Member No.: 16227
Mp3tag Version: 2.50



Hi, I would like to rename my files according to this scheme:

  • If there is not track number, I want my filename like this:
    Artist - Title
  • If there is track number then the name should follow this schme:
    (track) Artist - Title


I tried to use this action, but it doesn't work. What am I doing wrong?
$validate($if($isdigit(%track%),'('$num(%track%)') ',2),)%artist% - %title%,_)
Go to the top of the page
 
+Quote Post
ohrenkino
post Mar 21 2012, 18:51
Post #2


Member


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



ZITAT(Prorok Rak @ Mar 21 2012, 16:03) *
If there is not track number...

You could use the converter Tag-Filename and the mask
[(%track%) ]%artist% - %title%
The square brackets enclose the optional part


--------------------
42 - wie war die Frage / what was the question / comment était la question
Go to the top of the page
 
+Quote Post
Prorok Rak
post Mar 21 2012, 19:00
Post #3


Member


Group: Members
Posts: 4
Joined: 21-March 12
Member No.: 16227
Mp3tag Version: 2.50



Unbelievable. Who would say it's so easy.
Thank you.
Go to the top of the page
 
+Quote Post
pone
post Mar 21 2012, 19:11
Post #4


Member


Group: Full Members
Posts: 1684
Joined: 15-March 09
From: Germany
Member No.: 9103
Mp3tag Version: 2.59b



If it is crucial for your naming filenames, that %track% has to be a number, this is the optional %track% part like you wanted it in the first way:

$if($isdigit(%track%),'('$num(%track%,2)')' ,)
Go to the top of the page
 
+Quote Post
ra7h35m20s
post Apr 25 2012, 23:33
Post #5


Member


Group: Full Members
Posts: 18
Joined: 5-December 11
From: Florida, US
Member No.: 15682
Mp3tag Version: 2.51



Not sure how much detail you want in your filenames but this is how I like my filenames....

If I have multi disc sets then I append the discnumber as in the format below. Inversely, no multi disc just %track% %title%

%discnumber%-%track% %title%

For example:

The Album "Days of Rising Doom" from AINA. Disc 2, Track 2 would look like this:

2-17 The Beast Within

(I also number all tracks sequentially from 1 - number of tracks ... this seems to make it easier for some apps in the sorting process I have found)

I suppose the mechanics of it may be a bit confusing. But if you have the field %totaldiscs% or an equivalent this will work in your action group ...

Action:Format Value
1. Field: _FILENAME
2. Format String: $ifgreater(%totaldiscs%,1,$left(%discnumber%,2)-$num(%track%,2) %title%,$num(%track%,2) %title%)

Hope this helps you....

This post has been edited by ra7h35m20s: Apr 25 2012, 23:34
Go to the top of the page
 
+Quote Post
DetlevD
post Apr 26 2012, 05:15
Post #6


Member


Group: Full Members
Posts: 4794
Joined: 26-May 06
From: Wuppertal, Germany, Planet Earth
Member No.: 3194
Mp3tag Version: 2.61d



QUOTE (Prorok Rak @ Mar 21 2012, 17:03) *
Hi, I would like to rename my files according to this scheme:
  • If there is not track number, I want my filename like this:
    Artist - Title
  • If there is track number then the name should follow this schme:
    (track) Artist - Title

Try this format string expression with an action of your choice ...
$if(%TRACK%,'('$num(%TRACK%,2)'',%DUMMY%)%ARTIST%' - '%TITLE%)

If you want to prepend the running disc number, then try this expression ...
$ifgreater(%TOTALDISCS%,1,$num(%DISCNUMBER%,1)'-',%DUMMY%)$if(%TRACK%,'('$num(%TRACK%,2)'',%DUMMY%)%ARTIST%' - '%TITLE%)

DD.20120436.0636.CEST

This post has been edited by DetlevD: Apr 26 2012, 05:42


--------------------
* Beyond that, don't ask, when you don't know what to do with the answer. *
♥ home is where the heart is ♥
Go to the top of the page
 
+Quote Post
Prorok Rak
post Apr 26 2012, 19:50
Post #7


Member


Group: Members
Posts: 4
Joined: 21-March 12
Member No.: 16227
Mp3tag Version: 2.50



Thank you all for your tips.
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: 25th July 2014 - 04:39