Batch convert tag-filename?


#1

I had no problem doing a batch filename --> tag operation..
But I can't seem to rename files with tag --> filename
Using mp3tag version 2.82

Any suggestions appreciated

The first part worked great
Convert a directory of flac files filename --> tag
This worked great, with the simple parsing "%artist% - %title%"

But when I try to rename a directory of .m4a tracks from the title tag..
For a single file:

Whitney Houston - I look to you.m4a
Format string: %artist% - %title%
preview: "- Whitney Houston - I look to you.m4a"

And for a batch (2,000) of files:

Whitney Houston - I look to you.m4a
Format string: %artist% - %title%
preview: " - .m4a"

Am I missing something obvious? I could work around the "- " prefix quirk if I only needed to rename one file. But when I try a batch tag-filename operation the preview shows that the tag fields are not passed resulting in blank filenames.

edited for typos; .mp4 --> .m4a


#2

if you see nothing but the "-" as the filename, then you have not got any data in the referenced fields (or at least this is the case in the first file).

Do you see data in the columns of the file list? If that is empty, then the import from the file names with Convert>Filename-Tag did not go as expected.
Check the extended tags dialogue (Alt-T) for one file and see which field names you find.
Is there a typo like "titel" instead of "title"?
If you cannot find anything, a screenshot of the extended tags dialogue would be great.


#3

Thank you for pointing me in the right direction. Sure enough, there were a dozen files with empty tags at the top of the list, so that the first preview screen was showing all blank results.

The only remaining issue is that I still get " - " prefixed to the tag-filename results

e.g. tag - filename

   %artist - %title

original filename: [varies] e.g. Ariana Grande - Into you (24-96) (2017 HDtracks) (SACD sr) (2016).m4a
original title tag: Ariana Grande - Into you.m4a
converted filename: - Ariana Grande - Into you.m4a

It's not obvious why the hyphen is prefixed or how to squelch it. Does mp3tag presume that we will always use a minimum of three tag fields? But it isn't very hard to workaround either as consistent prefixes can be stripped with a bulk renaming utility.


#4

No, MP3tag does not presume anything in this case, it only uses, what data you supply.
So you have to check if either the string you use for filenames has a leading hyphen or whether the data in ARTIST itself has that - sort by ARTIST and see if you find artists with that character in front.


#5

There wasn't a leading hyphen in the ARTIST column or elsewhere. But it eventually dawned on me what was causing it. mp3tag is deriving each string variable from a different tag, rather than pulling multiple variables from a single tag as I was expecting as I was accustomed to with another program.

Not an issue at all once it was clear what is happening.

Thanks for your assistance in figuring out what had transpired.