Export tags from the first file found in my folder structure

I'm trying to devise a script that will grab the id3 tags of the first track in the first album folder from each album artist folder for export to RTF, but I'm not having much luck. I've tried modifying several scripts in this forum to no avail. I want to run the script from the second level of my folder structure, which is MUSIC<i>first letter in name {A,B,C,...}\ALBUM ARTIST\ALBUM\track.

For example: In MUSIC\A, there are ACDC, Aerosmith and Asia folders among others. I want the script to grab the tags from the first track it finds in each of those folders from this folder level. I'm assuming this will be the first track in the first ALBUM folder it finds within each ALBUM ARTIST folder.

If someone could point me in the right direction, I would very much appreciate it. I can format the tag structure I want myself. Thanks in advance.

Study the Mp3tag Help Manual - and perhaps some existing MTE scripts - about the function $loop and its optional second parameter.


Thanks for the hint. I actually found the Help Manual about 10 min after I posted. The problem was that I was putting the cart before the horse, looking at MTE scripts and trying to work backwards from them to get what I wanted without knowing how the scripting functions actually work. It took me all of about 5 min to come up with the script I needed after reading the manual. The script is so simple that it's somewhat embarrassing that I asked. Anyhow, thanks again.

In case anyone is wondering, the loop I needed is: