Mp3 Book Helper

Examples of Masks and Name Extraction

How to make a file name max 50 characters long not using Smart Trim?

 <Artist> <Album> $I - $N - <Title><X><.{50}>

How to extraction of artist track title, album from filenames?

Suppose you have Beatles White Album and files are stored as:

The Beatles\White Album\08 - Revolution 1.ogg
The Beatles\White Album\11 - Cry Baby Cry.ogg

Simple way: Use Filename to Tags dialog:

<Artist>\<Album>\<Track#> - <Title>

Advance way: In Tags tab enter following:

Tag name Mask Result
Artist/Author
<PFolder>
The Beatles
Album/Book
<Folder>
White Album
Track Title
<XS><[\d\s]*>< [\w\s',]*>$F
Revolution 1
Year 1968 1968

All information in file name:

The Beatles - The White Album - Disk 2 - 12 Revolution 9.ogg
The Beatles - The White Album - Disk 2 - 13 Good Night.ogg

Simple way: Filename to Tags dialog:

<Artist> - <Album> - <Ignore> - <Track#> <Title>

Advance way: In Tags tab enter following:

Tag name Mask Result
Artist/Author
<X><[\w\s]*>$F
The Beatles
Album/Book
<XS><[\w\s]*><[\w\s]*>$F
The White Album
Track Title
<XS><.*-\s\d+><[\w\s',]*>$F
Revolution 9
Track#
<XS><.*Disk \d+><\d.><File>
12

Useful Regular expressions Examples:

<FileCRC><R><^[\d\s-]*><> Removes starting Numbers spaces and - from SFV file name
<R><^.{4}><>$F
Remove first 4 characters from file name
<R><^[\w]*><>$F
Remove first alphanumeric characters from file name
<R><(?i)[a-z]*\Z><>$F
Remove last letters from file name, ignore case
<XS><[^ ]*><.*>$F Skip First word
   

Other variables behavior examples:

<Artist> = Paul McCartney <Album> = Back In The U.S.

Mask Result
<Artist> <Album>
Paul McCartney Back In The U.S.
<CL><Artist> <Album>
paul mccartney Back In The U.S.
<CL>[[<Artist> <Album>]]
paul mccartney back in the u.s.
<UM><Artist>
Paul Mc Cartney
<R>< ><*><Artist>
Paul*McCartney
<UM><R>< ><*><Artist>
Paul*Mc Cartney
<R>< ><*><UM><Artist>
Paul*Mc*Cartney

<Album> = The White Album - Disk 2, you want: The White Album - D2

There are many ways to do this now:

<R>< - Disk >< D><Album>

This would replace ' - Disk' by ' D' from Album

Or you could remove all from Album after ' -' and Extract the last number from Album:

<R>< -.*><><Album> D<X><\d+><Album>

Or get part of Album before first '-'

<X><[^-]*><Album>D<X><\d+><Album>

Page Top


http://mp3BookHelper.sourceforge.net released under the GNU/GPL license