Kodi - MP4 - NFO exporter - 1 NFO per MP4 help

I need help on what I'm missing to create a single NFO for each MP4 track. Kodi likes NFOs for data scraping and MP3TAG makes the most sense because of the MTE templating. I did see some NFO threads here, but they don't (or at least I didn't find) the example of how to loop and export an NFO for each file (assuming more than 1 MP4 file is loaded....like 10 or 50...etc).

So far I have:

$filename(%artist% - %title% - (%year%).nfo)
<musicvideo>
	<artist>%artist%</artist>
	<title>%title%</title>
	<genre>%genre%</genre>
	<plot>%plot%</plot>
</musicvideo>

NFO made on %_datetime% with %_app%

How do I make MP3TAG generate the XML tags, 1 NFO for each Track?

Thanks.
Chris

The idea is basically to do that in 3 steps:
First create a suitable export script
Second, run the export script to generate a single text file that can be run as batch file.
run the batch files that adds each row of text to a name nfo file.

echo <musicvideo> >> "%artist% - %title% - (%year%).nfo"
echo	<artist>%artist%</artist> >> "%artist% - %title% - (%year%).nfo"
echo	<title>%title%</title>  >> "%artist% - %title% - (%year%).nfo"
echo	<genre>%genre%</genre>  >> "%artist% - %title% - (%year%).nfo"
echo	<plot>%plot%</plot>  >> "%artist% - %title% - (%year%).nfo"
echo </musicvideo>  >> "%artist% - %title% - (%year%).nfo"

It could be that you have to experiment a little with the inverted commas so that the echo syntax does not get upset.

I assume my first post would be what step one is.....the 2nd step would be where I executed step 1 and have a single NFO file now.....but I'm not sure how to "run the batch files"...using MP3TAG??

I can "see" where you're going, I just don't understand the latter part....it's been a while..LOL.

The single file should have the extension ".bat" ideally (and not ".nfo").
You then open a command shell and navigate to that folder where this complete generated file is.
(one way to open a command shell in that folder would be to shift-right-click on the folder and select "Open command shell here")
you then type in the name of the complete file which gets executed if it has the extension ".bat"

The file should end up as

BELL BIV DEVOE - POISON (150-359P) - (2015).nfo

and within it:

<musicvideo>
	<artist>BELL BIV DEVOE</artist>
	<title>POISON (150-359P)</title>
	<genre>Pop-Folk</genre>
	<plot>No Plot</plot>
</musicvideo>

I looked at what your echo's do and when I ran it as its own MTE file....the output was not like shown here...I'll continue to look at it to see if I can wrap my head around the possible solution.

oooooh, I think I see where this is going...let me give it a try.