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
> Copy first 2 characters to field
w1nta
post Jul 11 2012, 01:10
Post #1


Member


Group: Members
Posts: 2
Joined: 11-July 12
Member No.: 16667
Mp3tag Version: 2.46



Hi,

I know this is going to be simple but I have been searchin the FAQ and forum for an hour and what I have tried isn't working. I want to copy the first 2 characters from the filename to the discnumber.

Filenames look like "36Albumname122.mp3"

I want the 36 to become the discnumber

Thanks.
Go to the top of the page
 
+Quote Post
stevehero
post Jul 11 2012, 02:55
Post #2


Member


Group: Full Members
Posts: 404
Joined: 3-December 10
From: Ireland
Member No.: 13334
Mp3tag Version: 2.54



QUOTE (w1nta @ Jul 11 2012, 01:10) *
Filenames look like "36Albumname122.mp3"

I want the 36 to become the discnumber

Thanks.

Use format action
field: DISCNUMBER
value: $regexp(%_FILENAME%,'^(d+).+',$1)

This post has been edited by stevehero: Jul 11 2012, 02:57


--------------------
I singing Dubstep ♪♫WOOB WOOB WOOB WOOB UBB OHMOMOMO DROP WOOOOOOB WOOB WOOB WOOB WUB WUB WUB WUB WUB WUB WUB WUB MOMOMO WOOB WOOB♫♪
Go to the top of the page
 
+Quote Post
DetlevD
post Jul 11 2012, 04:34
Post #3


Member


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



QUOTE (w1nta @ Jul 11 2012, 02:10) *
... I want to copy the first 2 characters from the filename to the discnumber. Filenames look like "36Albumname122.mp3" I want the 36 to become the discnumber ...

Action: Format value
... or ...
Converter: Tag - Tag

Field: DISCNUMBER
(fetch two leading characters)
Value/Format string: $left(%_filename%,2)
... or ...
(fetch two leading characters)
Value/Format string: $reverse($right($reverse(%_filename%),2))
... or ...
(fetch two leading digits)
Value/Format string: $regexp(%_filename%,'^(\d\d).+$','$1')
... or ...
(fetch all leading digits)
Value/Format string: $regexp(%_filename%,'^(\d+).+$','$1')

DD.20120711.0540.CEST

This post has been edited by DetlevD: Jul 11 2012, 06:18


--------------------
* 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
w1nta
post Jul 11 2012, 06:11
Post #4


Member


Group: Members
Posts: 2
Joined: 11-July 12
Member No.: 16667
Mp3tag Version: 2.46



Cheers guys.

This one worked for me

Action: Format value
Field: DISCNUMBER
Format string: $left(%_filename%,2)


1200 files in 5 seconds. BAM!
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 May 2013 - 12:02