# Apply one file's tag to all files using actions

**URL:** <https://community.mp3tag.de/t/apply-one-files-tag-to-all-files-using-actions/15594>\
**Category:** Support\
**Created:** [March 16, 2014, 11:50pm UTC](https://community.mp3tag.de/t/apply-one-files-tag-to-all-files-using-actions/15594 "2014-03-16T23:50:55Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![aax](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/edb3f5/32.png) [@aax](https://community.mp3tag.de/u/aax)\
**Post date:** [March 16, 2014, 11:50pm UTC](https://community.mp3tag.de/t/apply-one-files-tag-to-all-files-using-actions/15594/1 "2014-03-16T23:50:55Z")

</div>

Is this possible?  
Specifically, I wrote an action group that adds A-side and B-side track-info to comments for albums ripped from vinyl. Currently, I have to select tracks from side A (1-#) and apply it, which then also calculates side B and appends the info to comments. But only to those selected tracks (side A), which leaves the second half of the album without it.

Any way to add an action to the same action group that would copy, for example, first track's comment to all files open in Mp3Tag? If not, any other suggestions?

Here's the current action group:  
(I use bullets (•) to separate comments. The action group deletes any possible previous traces of the same action group, so if you, for example, apply it to wrong tracks, you can just run it again; but it won't touch whatever info you might have added after running it the previous time.)

# Append “A-side n–n” to selected tracks’ comments and calculate “B-side n–n”

## Replace with regular expression Field: COMMENT Regular expression: \s\*•_\s_A-side: \d+–\d+\s•\sB-side: \d+–\d+ Replace matches with: [empty]

## Replace with regular expression Field: COMMENT Regular expression: \s\*•_\s_$ Replace matches with: [empty]

## Replace with regular expression Field: COMMENT Regular expression: \s{2,} Replace matches with: [single space]

## Format value Field: COMMENT Format string: %comment% • A-side: 1–%\_total\_files% • B-side: $add(%\_total\_files%,1)–%\_total%

Replace with regular expression  
Field: COMMENT  
Regular expression: ^\s\*•_\s_  
Replace matches with: [empty]

---

<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:** [March 17, 2014, 5:43am UTC](https://community.mp3tag.de/t/apply-one-files-tag-to-all-files-using-actions/15594/2 "2014-03-17T05:43:49Z")

</div>

> [@aax](#):
>
> ... first track's comment to all files open in Mp3Tag? If not, any other suggestions?

The problem is, that MP3tag does not really know what the "first track" is. So it is not possible to determine which data is the master for all other files.

My other suggestion in this respect would be: use the tag panel. Or the extended tags dialogue.

---

<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:** [March 17, 2014, 6:51am UTC](https://community.mp3tag.de/t/apply-one-files-tag-to-all-files-using-actions/15594/3 "2014-03-17T06:51:35Z")

</div>

> [@aax](#):
>
> ... Any way to add an action to the same action group that would copy, for example, first track's comment to all files open in Mp3Tag? ...

This might be possible by exporting the data from the first track to an external text file, ...  
then by importing the external data to the other tracks.

In the Action and Converter area, Mp3tag has no overarching 'memory' between two tracks.  
In the Export area, Mp3tag supports user definable placeholders to hold data between tracks.

DD.20140317.0851.CET

---

<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:** [March 17, 2014, 7:04am UTC](https://community.mp3tag.de/t/apply-one-files-tag-to-all-files-using-actions/15594/4 "2014-03-17T07:04:50Z")

</div>

> [@DetlevD](#):
>
> This might be possible by exporting the data from the first track to an external text file, ...  
> then by importing the external data to the other tracks.
> 
> In the Action and Converter area, Mp3tag has no overarching 'memory' between two tracks.  
> In the Export area, Mp3tag supports user definable placeholders to hold data between tracks.
> 
> DD.20140317.0851.CET

I would consider this much more awkward than simply using the tag panel.  
You will not be able to apply a universal action group that behaves different for one file ("the first") than for the rest.

So, you would have to ...

- select the master file
- enter the correct data
- trigger one action (group) to export the data,
- select the other files,
- trigger the action (group) to import the data.

If you do the same thing with the tag panel you are quicker in general as you can use simple keyboard shortcuts. I would think that this is a feasible way to proceed:

Either (if you still have to enter the data)

- select all files
- enter the new data
- save the data  
or (if the master file already has the correct data)
- select all files (inlcuding the master file with the already updated data)
- select the correct data from the dropdown list
- save the data

Even if you think of a mechanism that treats the first file in a selection in a special way, I would hate to devise a sorting algorithm that puts the file that I consider to be the first on top of the list. And if I do it wrong I replace all the correct data with something random ...  
My verdict: tag panel

---

<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:** [March 17, 2014, 7:53am UTC](https://community.mp3tag.de/t/apply-one-files-tag-to-all-files-using-actions/15594/5 "2014-03-17T07:53:45Z")

</div>

> [@aax](#):
>
> Is this possible? ...

**Example Prepare tracks ... Track 1 : SIDE \<== 'A' ; TOTALTRACKS \<== 5 Track 2 : SIDE \<== 'A' ; TOTALTRACKS \<== 5 Track 3 : SIDE \<== 'A' ; TOTALTRACKS \<== 5 Track 4 : SIDE \<== 'B' ; TOTALTRACKS \<== 5 Track 5 : SIDE \<== 'B' ; TOTALTRACKS \<== 5 Prepare Action "Format value" ... Text \<== $if($eql(%SIDE%,'A'),'A-side: 1-'%\_total\_files%' # B-side: '$add(%\_total\_files%,1)'-'%TOTALTRACKS%,$if($eql(%SIDE%,'B'),'A-side: 1-'$sub(%TOTALTRACKS%,%\_total\_files%)' # B-side: '$add(1,$sub(%TOTALTRACKS%,%\_total\_files%))'-'%TOTALTRACKS%,)) Result should be ... Text = 'A-side: 1-3 # B-side: 4-5' Steps ... 1. Select all tracks from Side A. Run action "Format value". 2. Select all tracks from Side B. Run action "Format value".** 

DD.20140317.0953.CET

 

Another solution

 

Prepare the Tag-Panel ...  
by creating a new edit field, can be multi-line, in which you want to enter manually the appropriate text ...  
name the edit field as you wish, for example "Add Comment Vinyl", creating the tag-field ADD\_COMMENT.  
See Mp3tag/Extras/Options/Tag-Panel/Add Tag-Field (button).

 

Steps ...

 
1. Select all tracks from the album.
2. Open Tag Panel.
3. Enter the text 'A-side: 1-3 # B-side: 4-5'  
... into the edit field "Add Comment Vinyl".
4. Update and save the change to the selected tracks by pressing [Ctrl+S].
5. Run an action ...  
... to combine the both tag-fields COMMENT and ADD\_COMMENT.  
... and to remove tag-field ADD\_COMMENT.

 

DD.20140317.1026.CET

 

Regarding the proposal from above ...  
step "3. Enter the text 'A-side: 1-3 # B-side: 4-5'  
... you may minimize the input, only enter the four numbers ... 1 3 4 5  
and let the following action create the text string for appending to the tag-field COMMENT.

 

DD.20140318.0945.CET

---

<div class="post-metadata">

**Author:** ![aax](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/edb3f5/32.png) [@aax](https://community.mp3tag.de/u/aax)\
**Post date:** [March 17, 2014, 8:21pm UTC](https://community.mp3tag.de/t/apply-one-files-tag-to-all-files-using-actions/15594/6 "2014-03-17T20:21:18Z")

</div>

Thanks. The drop-down list in the Tag Panel completely slipped my mind, so I guess that's the simplest thing to do after applying the action to side-A tracks.

---

<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:** [March 17, 2014, 8:39pm UTC](https://community.mp3tag.de/t/apply-one-files-tag-to-all-files-using-actions/15594/7 "2014-03-17T20:39:29Z")

</div>

> [@aax](#):
>
> Thanks. The drop-down list in the Tag Panel ...

What do you mean by "drop-down list in the Tag Panel"?

DD.20140317.2239.CET

---

<div class="post-metadata">

**Author:** ![aax](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/edb3f5/32.png) [@aax](https://community.mp3tag.de/u/aax)\
**Post date:** [March 17, 2014, 9:56pm UTC](https://community.mp3tag.de/t/apply-one-files-tag-to-all-files-using-actions/15594/8 "2014-03-17T21:56:02Z")

</div>

I mean the list of values for each tag field (starts with , and lists all other values from selected files).

---

<div class="post-metadata">

**Author:** ![aax](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/edb3f5/32.png) [@aax](https://community.mp3tag.de/u/aax)\
**Post date:** [March 18, 2014, 12:03am UTC](https://community.mp3tag.de/t/apply-one-files-tag-to-all-files-using-actions/15594/9 "2014-03-18T00:03:00Z")

</div>

What exactly is “%\_total%”? It seems to work only with mp3 files and not with flac.

---

<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:** [March 18, 2014, 5:59am UTC](https://community.mp3tag.de/t/apply-one-files-tag-to-all-files-using-actions/15594/10 "2014-03-18T05:59:50Z")

</div>

In the Mp3tag help manual, section "Converter" and section "Export", there "%\_total%" is defined as a special placeholder:  
%\_total% ... **Total number** of tracks from xx/ **xx** track-number field.

The applied tag-type must support the track format "xx/xx".

DD.20140318.0759.CET

---

<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:** [March 18, 2014, 6:04am UTC](https://community.mp3tag.de/t/apply-one-files-tag-to-all-files-using-actions/15594/11 "2014-03-18T06:04:41Z")

</div>

> [@aax](#):
>
> I mean the list of values for each tag field (starts with , and lists all other values from selected files).

And what do you think, how will this be able to solve the task of appending text to the COMMENT tag-field?

DD.20140318.0804.CET

---

<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:** [March 18, 2014, 10:19am UTC](https://community.mp3tag.de/t/apply-one-files-tag-to-all-files-using-actions/15594/12 "2014-03-18T10:19:05Z")

</div>

Just a proposal.

1. Create edit field in Tag-Panel:  
Tag-Field: ADD\_COMMENT  
Title: Comme&nt (add):  
Single line edit field.

2. Create Action "Format value":  
ADD\_COMMENT \<== **$regexp(%ADD\_COMMENT%,'^\s\*(\d+)\s+(\d+)\s+(\d+)\s+(\d+)\s\*$',' # A-side: $1-$2 # B-side: $3-$4 # ')**

3. Create Action "Format value":  
COMMENT \<== **$regexp(%COMMENT%,'\s\*#_\s_A-side:\s\d+-\d+\s#\sB-side:\s\d+-\d+\s\*#_\s_','\<\<1\>\>')**

4. Create Action "Format value":  
COMMENT \<== **$ifgreater($strstr(%COMMENT%,'\<\<1\>\>'),0,$replace(%COMMENT%,'\<\<1\>\>',%ADD\_COMMENT%),%COMMENT%%ADD\_COMMENT%)**  
... or ...  
COMMENT \<== **$ifgreater($strstr(%COMMENT%,'\<\<1\>\>'),0,$replace(%COMMENT%,'\<\<1\>\>',%ADD\_COMMENT%),%COMMENT%$char(13)$char(10)$trim(%ADD\_COMMENT%))**

5.Create Action "Remove field":  
ADD\_COMMENT

1. Create action group:  
Collect actions 2..5 from above into one action group.

2. Example for manual input via Tag-Panel:  
ADD\_COMMENT \<== **'1 3 4 5'**  
... will be converted by action to ...

**' # A-side: 1-3 # B-side: 4-5 # '**

Possible simplification:  
The manual input of numbers can be reduced to two numbers, ...  
one number for the track sum of the A-side tracks, ...  
and one number for the track sum of the B-side tracks.

Workflow

1. Select files.
2. Manual input of number string via Tag-Panel.
3. Run action group (actions 2..5 from above).

Format COMMENT#Set COMMENT AB-Side (4Nrs [1 8 9 15] input Tag-Panel).mta

[Format\_COMMENT\_Set\_COMMENT\_AB\_Side\_\_4Nrs\_\_1\_8\_9\_15\_\_input\_Tag\_Panel\_.mta](https://community.mp3tag.de/uploads/default/original/2X/8/869d174d8f0a49103935008b3406312824e7c160.mta) (452 Bytes)  
Format COMMENT#Set COMMENT AB-Side (2Nrs [8 7] input Tag-Panel).mta  
[Format\_COMMENT\_Set\_COMMENT\_AB\_Side\_\_2Nrs\_\_8\_7\_\_input\_Tag\_Panel\_.mta](https://community.mp3tag.de/uploads/default/original/2X/e/ed4cc73bb134fc218fc6207dc6585d3ff21e784e.mta) (627 Bytes)

DD.20140318.1438.CET

[Format\_COMMENT\_Set\_COMMENT\_AB\_Side\_\_4Nrs\_\_1\_8\_9\_15\_\_input\_Tag\_Panel\_.mta](https://community.mp3tag.de/uploads/default/original/2X/8/869d174d8f0a49103935008b3406312824e7c160.mta) (452 Bytes)

[Format\_COMMENT\_Set\_COMMENT\_AB\_Side\_\_2Nrs\_\_8\_7\_\_input\_Tag\_Panel\_.mta](https://community.mp3tag.de/uploads/default/original/2X/e/ed4cc73bb134fc218fc6207dc6585d3ff21e784e.mta) (627 Bytes)

---

<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:** [March 18, 2014, 10:42am UTC](https://community.mp3tag.de/t/apply-one-files-tag-to-all-files-using-actions/15594/13 "2014-03-18T10:42:02Z")

</div>

> [@ohrenkino](#):
>
> ... My verdict: tag panel

Yes, that's right.

DD.20140318.1241.CET

---

<div class="post-metadata">

**Author:** ![aax](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/edb3f5/32.png) [@aax](https://community.mp3tag.de/u/aax)\
**Post date:** [March 18, 2014, 4:47pm UTC](https://community.mp3tag.de/t/apply-one-files-tag-to-all-files-using-actions/15594/14 "2014-03-18T16:47:39Z")

</div>

> [@DetlevD](#):
>
> QUOTE (aax @ Mar 17 2014, 23:56) \<{POST\_SNAPBACK}\>
> 
> I mean the list of values for each tag field (starts with , and lists all other values from selected files).

And what do you think, how will this be able to solve the task of appending text to the COMMENT tag-field?

DD.20140318.0804.CET

What I meant was this:

1. select A-side tracks
2. apply my action group from the first post (writes A-side from the amount of selected files and calculates and writes B-side)
3. select all tracks, then in the Comment field in the Tag Panel select the value of A-side tracks

But your proposal is also good.

---

<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:24pm UTC](https://community.mp3tag.de/t/apply-one-files-tag-to-all-files-using-actions/15594/15 "2026-02-09T12:24:58Z")

</div>

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


