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

**URL:** https://community.mp3tag.de/t/kodi-mp4-nfo-exporter-1-nfo-per-mp4-help/54989
**Category:** Support
**Created:** [November 2, 2021, 2:37pm UTC](https://community.mp3tag.de/t/kodi-mp4-nfo-exporter-1-nfo-per-mp4-help/54989 "2021-11-02T14:37:45Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![kittmaster](https://community.mp3tag.de/user_avatar/community.mp3tag.de/kittmaster/32/14793_2.png) [@kittmaster](https://community.mp3tag.de/u/kittmaster)
#### Post date: [November 2, 2021, 2:37pm UTC](https://community.mp3tag.de/t/kodi-mp4-nfo-exporter-1-nfo-per-mp4-help/54989/1 "2021-11-02T14:37:45Z")

</div>

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:

```auto
$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

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [November 2, 2021, 2:48pm UTC](https://community.mp3tag.de/t/kodi-mp4-nfo-exporter-1-nfo-per-mp4-help/54989/2 "2021-11-02T14:48:49Z")

</div>

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.

```auto
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.

---

<div class="post-metadata">

### Author: ![kittmaster](https://community.mp3tag.de/user_avatar/community.mp3tag.de/kittmaster/32/14793_2.png) [@kittmaster](https://community.mp3tag.de/u/kittmaster)
#### Post date: [November 2, 2021, 2:55pm UTC](https://community.mp3tag.de/t/kodi-mp4-nfo-exporter-1-nfo-per-mp4-help/54989/3 "2021-11-02T14:55:35Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [November 2, 2021, 2:58pm UTC](https://community.mp3tag.de/t/kodi-mp4-nfo-exporter-1-nfo-per-mp4-help/54989/4 "2021-11-02T14:58:22Z")

</div>

> [@kittmaster](#):
>
> have a single NFO file now

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"

---

<div class="post-metadata">

### Author: ![kittmaster](https://community.mp3tag.de/user_avatar/community.mp3tag.de/kittmaster/32/14793_2.png) [@kittmaster](https://community.mp3tag.de/u/kittmaster)
#### Post date: [November 2, 2021, 3:00pm UTC](https://community.mp3tag.de/t/kodi-mp4-nfo-exporter-1-nfo-per-mp4-help/54989/5 "2021-11-02T15:00:40Z")

</div>

The file should end up as

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

```

and within it:

```auto
<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.

---

<div class="post-metadata">

### Author: ![kittmaster](https://community.mp3tag.de/user_avatar/community.mp3tag.de/kittmaster/32/14793_2.png) [@kittmaster](https://community.mp3tag.de/u/kittmaster)
#### Post date: [November 2, 2021, 3:02pm UTC](https://community.mp3tag.de/t/kodi-mp4-nfo-exporter-1-nfo-per-mp4-help/54989/6 "2021-11-02T15:02:58Z")

</div>

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

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [January 24, 2025, 3:00pm UTC](https://community.mp3tag.de/t/kodi-mp4-nfo-exporter-1-nfo-per-mp4-help/54989/7 "2025-01-24T15:00:53Z")

</div>

A post was split to a new topic: [Import data from nfo files into MP4 tags](https://community.mp3tag.de/t/import-data-from-nfo-files-into-mp4-tags/67266)

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [January 25, 2025, 6:43am UTC](https://community.mp3tag.de/t/kodi-mp4-nfo-exporter-1-nfo-per-mp4-help/54989/8 "2025-01-25T06:43:39Z")

</div>


