Renaming folders to Album when there is definite and indefinite articles

I'm renaming audiobook folders and want to shift "The", "An", and "A" to after the rest of the title (Album tag). So, e.g.:

"The Evolution of Desire - David Buss" would get renamed to:
"Evolution of Desire, The - David Buss"

I'm almost there! This is what I'm doing:

  1. Drag folder into Mp3tag
  2. press alt-5 to bring up to rename menu (tag-tag)
  3. Then type in _DIRECTORY (use the underscore and then all CAPS).
  4. Use something like this for the expression:
    $regexp(%album%,^(The|An|A)\s(.+)$,$2',' $1) - %artist%

For some reason this expression results in an extra space at the beginning. I get:
" Evolution of Desire, The - David Buss".

This one has been driving me crazy.

I had a space before the $regexp that I just now noticed! Mystery solved.

1 Like

Iā€˜d recommend the intermediate step of storing and reviewing the string in %albumsort%.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.