# Parse the file name

**URL:** <https://community.mp3tag.de/t/parse-the-file-name/16226>\
**Category:** Support\
**Created:** [October 10, 2014, 6:03pm UTC](https://community.mp3tag.de/t/parse-the-file-name/16226 "2014-10-10T18:03:36Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Frank\_GC](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/f/54ee81/32.png) [@Frank\_GC](https://community.mp3tag.de/u/Frank_GC)\
**Post date:** [October 10, 2014, 6:03pm UTC](https://community.mp3tag.de/t/parse-the-file-name/16226/1 "2014-10-10T18:03:36Z")

</div>

Hello,  
This is my first attempt to use MP3Tag.  
I have music files in the form:

Composer Title.mp3 e.g.:  
Rachmaninov Piano Concerto No\_3 in D minor, Op\_30 - 3\_ Finale (Alla breve)(1).mp3

The first proper noun is the Composer. The remainder of the file name is the Title .mp3  
Is there a way to build tags to extract the Composer and Title from the file name?

Thanks  
Frank C

---

<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:** [October 10, 2014, 6:09pm UTC](https://community.mp3tag.de/t/parse-the-file-name/16226/2 "2014-10-10T18:09:04Z")

</div>

you can try  
Convert\>filename-tag  
Enter as mask:  
%composer% %title%

---

<div class="post-metadata">

**Author:** ![poster](https://community.mp3tag.de/user_avatar/community.mp3tag.de/poster/32/4881_2.png) [@poster](https://community.mp3tag.de/u/poster)\
**Post date:** [October 10, 2014, 6:17pm UTC](https://community.mp3tag.de/t/parse-the-file-name/16226/3 "2014-10-10T18:17:45Z")

</div>

To do this automatically you would need a delimiter that seperates the composer from the title.  
In your example this delimiter is a blank.  
As a blank may occur in many ways not only as a delimiter between composer and title but also as part of the composer, I can see no way do do this.

e.g.  
Ludwig van Beethoven Symphony No. 5.mp3

---

<div class="post-metadata">

**Author:** ![DetlevD](https://community.mp3tag.de/user_avatar/community.mp3tag.de/detlevd/32/123_2.png) [@DetlevD](https://community.mp3tag.de/u/DetlevD)\
**Post date:** [October 11, 2014, 5:32am UTC](https://community.mp3tag.de/t/parse-the-file-name/16226/4 "2014-10-11T05:32:02Z")

</div>

> [@Frank C](#):
>
> I have music files in the form:  
> Composer Title.mp3 e.g.:  
> Rachmaninov Piano Concerto No\_3 in D minor, Op\_30 - 3\_ Finale (Alla breve)(1).mp3  
> The first proper noun is the Composer. The remainder of the file name is the Title .mp3  
> Is there a way to build tags to extract the Composer and Title from the file name? ...

As 'poster' has pointed out, there is a problem with the filename, which has no distinct or unique character, which can work as a separator between the composer part and the title part.  
But there might be a way to go, when you are able to insert a separator character or string between the two parts.  
Having these filenames ...  
Ludwig van Beethoven Symphony No. 5.mp3  
Rachmaninov Piano Concerto No\_3 in D minor, Op\_30 - 3\_ Finale (Alla breve)(1).mp3  
... there is, following the composer's name, the title part, starting with a special word like 'Symphony' or 'Piano'.

It is easy to double the space character before the word 'Piano' and the word 'Symphony'.  
Replace ' Piano' with ' Piano'.  
Replace ' Symphony' with ' Symphony'.  
... or ...  
Replace 'Piano' with ' Piano'.  
Replace 'Symphony' with ' Symphony'.

Use Convert "Filename - Tag".

**Filename: "T:\TEST\Ludwig van Beethoven Symphony No. 5.mp3" Format string: %ARTIST% %TITLE% ARTIST: Ludwig van Beethoven TITLE: Symphony No. 5**

Alternatively you can use a 1-step action "Guess values".

**Source format: $replace(%\_filename%,' Symphony',' Symphony') Guessing pattern: %ARTIST% %TITLE%**

... or ...

**Source format: $regexp(%\_filename%,' (Piano|Symphony) ',' $1 ') Guessing pattern: %ARTIST% %TITLE%**

... or ...

**Source format: $regexp(%\_filename%,' (Piano|Symphony) ',' - $1 ') Guessing pattern: %ARTIST% - %TITLE%**

You may use any character or string as the separator, which can ease the splitting.

DD.20141011.0945.CEST

---

<div class="post-metadata">

**Author:** ![poster](https://community.mp3tag.de/user_avatar/community.mp3tag.de/poster/32/4881_2.png) [@poster](https://community.mp3tag.de/u/poster)\
**Post date:** [October 11, 2014, 6:55am UTC](https://community.mp3tag.de/t/parse-the-file-name/16226/5 "2014-10-11T06:55:56Z")

</div>

Just another idea to do it **half** -automatically.  
I think that there are only few composers and a lot more titles.

My suggestion is:

1. Filter with the composer's name  
e.g. %\_filename% HAS Rachmaninov

2. Mark all the filtered files and fill in the composer's name manually in the tag-panel

Now you have a tag with the composer's name and you only need to extract the title from the filename.  
For this define an action  
Field: TITLE  
Format String: $cutleft(%\_filename%,$add($len(%artist%),1))

I am sure there might be a more elegant solution but I think my solution at least spares you some work.

---

<div class="post-metadata">

**Author:** ![Frank\_GC](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/f/54ee81/32.png) [@Frank\_GC](https://community.mp3tag.de/u/Frank_GC)\
**Post date:** [October 13, 2014, 5:22pm UTC](https://community.mp3tag.de/t/parse-the-file-name/16226/6 "2014-10-13T17:22:52Z")

</div>

Thanks to all for the suggestions.  
I will report back when I have tried them.  
In case I have to do lots of renaming,  
what would be an appropriate field delimiter between Composer and Title  
that MP3tag could use?  
Frank C

---

<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:** [October 13, 2014, 5:38pm UTC](https://community.mp3tag.de/t/parse-the-file-name/16226/7 "2014-10-13T17:38:46Z")

</div>

> [@Frank C](#):
>
> ...  
> what would be an appropriate field delimiter between Composer and Title  
> that MP3tag could use?  
> Frank C

it is not really something for MP3tag - it is something that has to do with structure: the delimiter gives an amorphous string a structure.  
The best thing is usually something that does not appear in ordinary language or writing.  
The blank (space) is bad as it delimits every word.  
A hyphen is a little better but still appears in a lot of titles.  
If you have the choice then I would suggest the underscore \_  
But probably your files already have a name that do not know that they should be parsed by Mp3tag soon.

---

<div class="post-metadata">

**Author:** ![Frank\_GC](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/f/54ee81/32.png) [@Frank\_GC](https://community.mp3tag.de/u/Frank_GC)\
**Post date:** [February 9, 2015, 7:41pm UTC](https://community.mp3tag.de/t/parse-the-file-name/16226/8 "2015-02-09T19:41:11Z")

</div>

Thanks to all,  
I got it to work for my classical music folder.  
The file names were Composer (blank) Composition Title.  
I used the filter "File Name-Tag" and the format %artist% %title%  
For Ippolitov\_Ivanov I used the underscore.

If I have a folder entirely by one artist is there a way to load this artist as a literal into every properties \> artist?

Thanks  
Frank C

---

<div class="post-metadata">

**Author:** ![poster](https://community.mp3tag.de/user_avatar/community.mp3tag.de/poster/32/4881_2.png) [@poster](https://community.mp3tag.de/u/poster)\
**Post date:** [February 10, 2015, 6:15am UTC](https://community.mp3tag.de/t/parse-the-file-name/16226/9 "2015-02-10T06:15:48Z")

</div>

Take the Converter Tag-\>Tag or alternatively define an action Format Value:

Converter  
Field: ARTIST  
Format String: %\_directory%

Action  
Type: Format Value  
Field: ARTIST  
Format String: %\_directory%

---

<div class="post-metadata">

**Author:** ![Frank\_GC](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/f/54ee81/32.png) [@Frank\_GC](https://community.mp3tag.de/u/Frank_GC)\
**Post date:** [February 10, 2015, 8:27pm UTC](https://community.mp3tag.de/t/parse-the-file-name/16226/10 "2015-02-10T20:27:36Z")

</div>

Thanks Poster,  
That Worked. But, I don't understand how it did.  
I used it on a folder of Al Hirt. Each file is in the form:  
Title - Hirt  
ex.  
Danke Schoen-Hirt.mp3  
I used:  
Converter  
Field: ARTIST  
Format String: %\_directory%  
as you suggested.  
I guess the Name Al Hirt came from the Folder (directory name).  
I didn't have Al in each file, only Hirt.  
That's Great!  
Thanks  
Frank C

---

<div class="post-metadata">

**Author:** ![poster](https://community.mp3tag.de/user_avatar/community.mp3tag.de/poster/32/4881_2.png) [@poster](https://community.mp3tag.de/u/poster)\
**Post date:** [February 10, 2015, 8:44pm UTC](https://community.mp3tag.de/t/parse-the-file-name/16226/11 "2015-02-10T20:44:26Z")

</div>

> [@Frank C](#):
>
> I guess the Name Al Hirt came from the Folder (directory name).

You guess right.  
The content of the artist-tag was replaced by the folder-name.

---

<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:** [February 9, 2026, 12:25pm UTC](https://community.mp3tag.de/t/parse-the-file-name/16226/12 "2026-02-09T12:25:18Z")

</div>

Closed on February 9, 2026, 12:25pm UTC


