advice for newbie about bulk scripting

A very long time ago I used mp3tag to embed art in my entire library, as the player I was using then really needed the art embedded to be able to use it.

Now I seem to have the opposite problem, as my current player seems to prefer art that is in the form of folder art (folder.jpg) and all my art is embedded in the mp3s.

I can't for the life of me remember how mp3tag scripting works (though I definitely figured it out back then, back when my brain was young and probably working much better!).

What script could I use to go through 40,000 tracks and extract embedded art and turn it into folder art? Given the structure of the library it should work fine to just take the art from the first track in every folder.

Thanks for any guidance (or, indeed, actually writing the script for me!).

(yeah, the irony is I downloaded mp3tag in the first places, many years ago, precisely in order to take the folder art and embed it in every mp3...and now I need to do precisely the reverse exercise)

Answering myself, I've found this

How to batch Im-/Export of Cover Art?

which solves part of my problem. Only thing is I'm still not clear how, having created an action to extract the cover, I can tell mp3tag to do it in bulk to the entire library (or, rather, to the first track in every folder), rather than just one at a time.

Check your action if you have ruled out the option to create duplicates.
Then select ALL files.
Start the action.
You get one picture file per folder. Provided you have not added pictures of different sizes. Then you get as many picture files in a folder as there are variations in the files.

Did you know: you can create an action group with an action that creates the notorious folder.jpg file and you add action that creates a picture files that shows you in the filename some more data, e.g.
might lead to a filename like

Thanks - though in the meantime I found an itunes script do do the same thing...BUT...discovered that iTunes converts embedded art to PNGs, and I need jpgs. And then, to make things worse, the itunes script I used created files misnamed folder.jpg even if the art was actually a png not a jpg - meaning I can't even see which art is in the wrong format, as its all called .jpg even when a lot of it isn't in jpg format at all. Though windows seems to be able to display the incorrectly labelled images, paintshop can't and nor can the mp3 player.

I really have to stop using iTunes entirely (have switched to rockbox, so don't really need it any more).

Anyway, perhaps I'll try again with mp3tag in the way you suggest...but is there a way to deal with the cases where the embedded art is PNG not jpg? I suppose its asking too much of mp3tag to convert file formats, as that's really the job of an image program.

OK - I've found a bulk converter program, so I figure I can do the job with a combination of mp3tag (which I've found does correctly identify png images, unlike the iTunes script) and that converter.

Also, mp3tag seems to extract the images much faster than the iTunes script did. (Its a pretty useful program all round, really)

Now I just have to find an alternative music manager to iTunes, as its converting of art to PNG for no good reason means its annoyed me one time too many. Its got to go!

You can find the files where the embedded covers are not jpgs:
Load the files.
Apply a filter:
NOT %_cover_mimetype% HAS jp

You can add a column in the files list with
in "Value". Leave "Field" empty. THis shows you the type of embedded picture.