# Match source txt/ csv/ xml files by name or relative path per media file

**URL:** <https://community.mp3tag.de/t/match-source-txt-csv-xml-files-by-name-or-relative-path-per-media-file/62244>\
**Category:** Support\
**Created:** [September 29, 2023, 10:17am UTC](https://community.mp3tag.de/t/match-source-txt-csv-xml-files-by-name-or-relative-path-per-media-file/62244 "2023-09-29T10:17:36Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![professor\_jonny](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/p/8e8cbc/32.png) [@professor\_jonny](https://community.mp3tag.de/u/professor_jonny)\
**Post date:** [September 29, 2023, 10:17am UTC](https://community.mp3tag.de/t/match-source-txt-csv-xml-files-by-name-or-relative-path-per-media-file/62244/1 "2023-09-29T10:17:36Z")

</div>

I'm wanting to import tags for Movie XML Schema formatted files but I'm unsure how to do this in a batch way or if it is possible using the convert text to tag function.

I have processed movie media with media companion and have xml formatted files with tag data inside. the program structures directory per media file with xml, and thumb nails inside.  
I would like to import this into tags.

The converter tool to import files via csv or txt assumes one has a single file with all the content to put into tags not la list of files with tags per each media file (I think).  
Can I pull tags from separate files relative to the directory where the files are stored in a batch way?

Basically, I'd like to match the source txt/ csv/ xml by name or relative path per media file.

I think a file parser that can parse local folder structures for the text to tag function would be required unless I'm missing something.

From my understanding ill have to put all the tags from every file into a single file or specify one file at a time to import tags.

More info here on the xml format:  
[Movie XML Schema - Media Companion Documentation](https://documentation.help/Media-Companion/xml-schema.html)

---

<div class="post-metadata">

**Author:** ![LyricsLover](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/c6cbf5/32.png) [@LyricsLover](https://community.mp3tag.de/u/LyricsLover)\
**Post date:** [September 29, 2023, 10:23am UTC](https://community.mp3tag.de/t/match-source-txt-csv-xml-files-by-name-or-relative-path-per-media-file/62244/2 "2023-09-29T10:23:53Z")

</div>

You could start reading here:

> **[Import Tags from Text Files – Mp3tag Documentation](https://docs.mp3tag.de/converters/import-tags-from-text-files/)**
>
> Documentation on Text File to Tag, a converter to import tags from text files. Mp3tag is the universal Tag Editor.

You will find the syntax of text files (no XML!) as well as you can match files from the text file to Mp3tag’s File List.

---

<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:** [September 29, 2023, 10:27am UTC](https://community.mp3tag.de/t/match-source-txt-csv-xml-files-by-name-or-relative-path-per-media-file/62244/3 "2023-09-29T10:27:07Z")

</div>

There is also an action that imports the whole contents of a given file into a single field:

> **[Import Text File – Mp3tag Documentation](https://docs.mp3tag.de/actions/import-text/)**
>
> Documentation on the Import Text File action type that can be performed as Quick Action or as reusable workflow from Action Groups. Mp3tag is the universal Tag Editor.

So, this action could be a way to get the data from varying files into a user-defined field and then strip all the extra parts from the real data and import the field data into fields, perhaps with "Guess value".

---

<div class="post-metadata">

**Author:** ![professor\_jonny](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/p/8e8cbc/32.png) [@professor\_jonny](https://community.mp3tag.de/u/professor_jonny)\
**Post date:** [September 29, 2023, 11:30am UTC](https://community.mp3tag.de/t/match-source-txt-csv-xml-files-by-name-or-relative-path-per-media-file/62244/4 "2023-09-29T11:30:28Z")

</div>

it looks like I can use place holders to import a complete file's contents into a single field using actions?

something like this as below?  
%\_folderpath%%\_Filename%.%\_extension%,XML

---

<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:** [September 29, 2023, 11:38am UTC](https://community.mp3tag.de/t/match-source-txt-csv-xml-files-by-name-or-relative-path-per-media-file/62244/5 "2023-09-29T11:38:40Z")

</div>

You would have to assign a field as target for the file contents. this could be a user-defined field, e.g. XML\_DATA.  
The Convert\>Textfile-Tag expects a structure of 1 line per record/file and can serve several files.

---

<div class="post-metadata">

**Author:** ![system](https://community.mp3tag.de/uploads/default/original/2X/c/ce7035d426cb755a7916793326d23b465222a407.png) [@system](https://community.mp3tag.de/u/system)\
**Post date:** [October 29, 2023, 11:39am UTC](https://community.mp3tag.de/t/match-source-txt-csv-xml-files-by-name-or-relative-path-per-media-file/62244/6 "2023-10-29T11:39:18Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
