# Splitting Filename into other fields

**URL:** https://community.mp3tag.de/t/splitting-filename-into-other-fields/63671
**Category:** Support
**Created:** [February 3, 2024, 5:10pm UTC](https://community.mp3tag.de/t/splitting-filename-into-other-fields/63671 "2024-02-03T17:10:19Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Ian\_Werich](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/i/9de0a6/32.png) [@Ian\_Werich](https://community.mp3tag.de/u/Ian_Werich)
#### Post date: [February 3, 2024, 5:10pm UTC](https://community.mp3tag.de/t/splitting-filename-into-other-fields/63671/1 "2024-02-03T17:10:19Z")

</div>

Hi everyone,

I have to manage a large number of music tracks starting from the FILENAME field which contains all the elements to populate the fields of each tracks.  
All elements of the FILENAME are separated by the "- " character (i.e.: space, dash, space).

Here is sample of FILENAME and its FILENAME structure:

**3907 - A BAILAR - JOSE BASSO - ALFREDO BELUSI - 1967 - TANGO CANTATO**

Structure:  
3907 = **TRACK NUMBER** (not important to me; could be omissed at the end of the job)  
A BAILAR = **TITLE**  
JOSE BASSO = **ARTIST**  
ALTREDO BELUSI = **ALBUM ARTIST**  
1967 = **DATE** (four digits)  
TANGO CANTATO = **GENRE**

I would like to point out, in case it is useful to know, that not all FILENAMES also contain the data for the ALBUMARTIST field, but only the data for the ARTIST field.  
Therefore, the translation rule should state that if the value of the YEAR field is found after the third element of the FILENAME (i.e., the TITLE field), the ALBUMARTIST field should be omitted.

Thank very much!  
Ian

---

<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: [February 3, 2024, 5:48pm UTC](https://community.mp3tag.de/t/splitting-filename-into-other-fields/63671/2 "2024-02-03T17:48:09Z")

</div>

> [@Ian\_Werich](#):
>
> Therefore, the translation rule should state that if the value of the YEAR field is found after the third element of the FILENAME (i.e., the TITLE field), the ALBUMARTIST field should be omitted.

I thnik that the import of data form the filename happens only very few times in the life of a file, in many cases only once.  
Therefore I still suggest that you treat the files with the full set of fields first  
and then filter for the ones where the import pattern in Convert\>Filename-Tag did not match and therefore did not get any data.  
The pattern for

> [@Ian\_Werich](#):
>
> 3907 - A BAILAR - JOSE BASSO - ALFREDO BELUSI - 1967 - TANGO CANTATO

would be:  
`%track% - %title% - %artist% - %albumartist% - %year% - %genre%`

---

<div class="post-metadata">

### Author: ![Ian\_Werich](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/i/9de0a6/32.png) [@Ian\_Werich](https://community.mp3tag.de/u/Ian_Werich)
#### Post date: [February 3, 2024, 6:09pm UTC](https://community.mp3tag.de/t/splitting-filename-into-other-fields/63671/3 "2024-02-03T18:09:48Z")

</div>

Thank for the suggestion! I couldn't locate the proper (and so easy!) function to my needs!  
Ian

---

<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: [March 4, 2024, 6:10pm UTC](https://community.mp3tag.de/t/splitting-filename-into-other-fields/63671/4 "2024-03-04T18:10:25Z")

</div>

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