# Action script to change track details

**URL:** https://community.mp3tag.de/t/action-script-to-change-track-details/70842
**Category:** Support
**Created:** [March 8, 2026, 11:51am UTC](https://community.mp3tag.de/t/action-script-to-change-track-details/70842 "2026-03-08T11:51:37Z")
**Posts on this page:** 18
**Page:** 1

<div class="post-metadata">

### Author: ![reddwarf4ever](https://community.mp3tag.de/user_avatar/community.mp3tag.de/reddwarf4ever/32/22473_2.png) [@reddwarf4ever](https://community.mp3tag.de/u/reddwarf4ever)
#### Post date: [March 8, 2026, 11:51am UTC](https://community.mp3tag.de/t/action-script-to-change-track-details/70842/1 "2026-03-08T11:51:37Z")

</div>

I need an action or group action for the following.

Will use the action for all files in an album, to change from one album to a different one.

1-Replace cover art, from folder/ file  
2-rename genre to..  
3-rename album name to ..  
4- set album artist to Various  
5-set track number to blank  
6-set disk number to blank  
7-delete comment field  
8-save

Any help would be appreciated

Looked at tutorial but not sure how to proceed

---

<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 8, 2026, 12:01pm UTC](https://community.mp3tag.de/t/action-script-to-change-track-details/70842/2 "2026-03-08T12:01:53Z")

</div>

Could you eleborate a little

1. what would be the name pattern for the picture file name?
2. should this be always the same genre or a different one each time? If the latter is the case, then you would have to edit the action group when the data should be different.
3. should this always be the same album name or a different one each time? If the latter is the case, then you would have to edit the action group when the data should be different.
4. Try an action of the type "Format value" for ALBUMARTIST with Format string "Various"
5. &6&7. Try an action of the type "Remove fields" with Fields: track;discnumber;comment
6. superfluous, modifcations are saved automatically once an action has finished with a file.

---

<div class="post-metadata">

### Author: ![reddwarf4ever](https://community.mp3tag.de/user_avatar/community.mp3tag.de/reddwarf4ever/32/22473_2.png) [@reddwarf4ever](https://community.mp3tag.de/u/reddwarf4ever)
#### Post date: [March 8, 2026, 12:27pm UTC](https://community.mp3tag.de/t/action-script-to-change-track-details/70842/3 "2026-03-08T12:27:00Z")

</div>

1. what would be the name pattern for the picture file name? \>\> The image file for the cover art is in a folder on my HDD just need to point to it as a replacement for the existing

2. should this be always the same genre or a different one each time? If the latter is the case, then you would have to edit the action group when the data should be different. \>\> Same

3. should this always be the same album name or a different one each time? If the latter is the case, then you would have to edit the action group when the data should be different. \>\> Different will create individual action groups

4. Try an action of the type "Format value" for ALBUMARTIST with Format string "Various" \>\> ok thanks

5. &6&7. Try an action of the type "Remove fields" with Fields: track;discnumber;comment \>\> ok thanks

6. superfluous, modifcations are saved automatically once an action has finished with a file. \> Ok thanks wasn't sure 👍

---

<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 8, 2026, 12:44pm UTC](https://community.mp3tag.de/t/action-script-to-change-track-details/70842/4 "2026-03-08T12:44:25Z")

</div>

> [@reddwarf4ever](#):
>
> The image file for the cover art is in a folder on my HDD just need to point to it as a replacement for the existing

Is this a fixed name like folder.jpg or is there just a single picture file in the folder?  
In any case: it would be an action of the type "Import cover from file" in which you define a filename for a picture. WIldcards are allowed.

1. Create an action of the type "Format value" for Genre and set the genre name.
2. I would still use the tag panel and set the album name (the same would apply to the genre). IMHO it takes much longer to create an action than to select the files that should get the same data, enter the data in the tag panel and save the modification.

---

<div class="post-metadata">

### Author: ![MotleyG](https://community.mp3tag.de/user_avatar/community.mp3tag.de/motleyg/32/440_2.png) [@MotleyG](https://community.mp3tag.de/u/MotleyG)
#### Post date: [March 8, 2026, 2:15pm UTC](https://community.mp3tag.de/t/action-script-to-change-track-details/70842/5 "2026-03-08T14:15:58Z")

</div>

> [@reddwarf4ever](#):
>
> 2-rename genre to..  
> 3-rename album name to ..

These two steps will be a challenge for an Action. Keep in mind an Action uses existing information and does not have "interactive" steps where it pauses and waits for input from the user. So running the Action and expecting a way to update the Album and Genre tags is not something it can do. This is best to do manually in the Tag Panel, then an action can be run to take care of the remaining items in your list.

---

<div class="post-metadata">

### Author: ![reddwarf4ever](https://community.mp3tag.de/user_avatar/community.mp3tag.de/reddwarf4ever/32/22473_2.png) [@reddwarf4ever](https://community.mp3tag.de/u/reddwarf4ever)
#### Post date: [March 8, 2026, 2:27pm UTC](https://community.mp3tag.de/t/action-script-to-change-track-details/70842/6 "2026-03-08T14:27:45Z")

</div>

action of the type "Import cover from file" in which you define a filename for a picture. WIldcards are allowed.

Thank you, it's only the image file that remains, the image usually has the name “folder" but may not be, but the folder only has one image file, so with ‘import cover from file’ could I then dodcify the folder and load the jpg there whatever nane it's called, as there will only be one jpg.

I understand your comment that there are other simpler ways to make the change, but mostly I wanted to understand and learn actions. I created many of my own, mostly by utilizing other actions and adapting them, a great way to learn, I have found.

---

<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 8, 2026, 2:34pm UTC](https://community.mp3tag.de/t/action-script-to-change-track-details/70842/7 "2026-03-08T14:34:05Z")

</div>

> [@reddwarf4ever](#):
>
> it's only the image file that remains

You could try as  
Filename: `*.jpg`  
to import the first found jpg file from the folder of the audio file.

My opinion about actions to set varying data was only to illustrate that not all functions match the motto "one fits all" but should be selected in correspondence to the task.  
That is why MP3tag not only has action but also the tag panel, the file list, export, web sources, filters, scripting, the extended tags dialogue.

---

<div class="post-metadata">

### Author: ![reddwarf4ever](https://community.mp3tag.de/user_avatar/community.mp3tag.de/reddwarf4ever/32/22473_2.png) [@reddwarf4ever](https://community.mp3tag.de/u/reddwarf4ever)
#### Post date: [March 8, 2026, 6:30pm UTC](https://community.mp3tag.de/t/action-script-to-change-track-details/70842/8 "2026-03-08T18:30:15Z")

</div>

Sorry decided to delete this

---

<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 8, 2026, 6:31pm UTC](https://community.mp3tag.de/t/action-script-to-change-track-details/70842/9 "2026-03-08T18:31:54Z")

</div>

> [@reddwarf4ever](#):
>
> Locate image within the same folder as the file, but in the subfolder named “template”

Try a filename with a relative path:  
`template\*.jpg`

---

<div class="post-metadata">

### Author: ![reddwarf4ever](https://community.mp3tag.de/user_avatar/community.mp3tag.de/reddwarf4ever/32/22473_2.png) [@reddwarf4ever](https://community.mp3tag.de/u/reddwarf4ever)
#### Post date: [March 8, 2026, 6:38pm UTC](https://community.mp3tag.de/t/action-script-to-change-track-details/70842/10 "2026-03-08T18:38:20Z")

</div>

Thankyou

Sorry I deleted the post, as you were replying

So if I use

Action of the type "Import cover from file" in which you define a filename for a picture. WIldcards are allowed.

So do I enter the location Where I define the filename 🤔

---

<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 8, 2026, 6:41pm UTC](https://community.mp3tag.de/t/action-script-to-change-track-details/70842/11 "2026-03-08T18:41:05Z")

</div>

Please try the suggested filename with a relative path component.

---

<div class="post-metadata">

### Author: ![reddwarf4ever](https://community.mp3tag.de/user_avatar/community.mp3tag.de/reddwarf4ever/32/22473_2.png) [@reddwarf4ever](https://community.mp3tag.de/u/reddwarf4ever)
#### Post date: [March 8, 2026, 6:52pm UTC](https://community.mp3tag.de/t/action-script-to-change-track-details/70842/12 "2026-03-08T18:52:10Z")

</div>

Ok will do, be a lot easier with mp3tag open, to try the action script.

If I get stuck I'll send a screenshot.

I am not expecting the action to accept any input from me.

I have several albums, so will write an action group for each album. Unless \*\* below is possible, then could have a single action group which will work for all albums, which would be perfect.

The album artists & genre, will always be the same name, I e Album artist “various” genre “mixed” the artwork will be from the folder.

\*\* The album name will change, unless I can script the album name to equal the folder name of the file 🤞

e.g. slow, fast,jazz etc. etc.

---

<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 8, 2026, 6:55pm UTC](https://community.mp3tag.de/t/action-script-to-change-track-details/70842/13 "2026-03-08T18:55:32Z")

</div>

> [@reddwarf4ever](#):
>
> The album name will change, unless I can script the album name to equal the folder name of the file

Try an action of the type "Format value" for ALBUM  
Format string: `%_directory%`

---

<div class="post-metadata">

### Author: ![reddwarf4ever](https://community.mp3tag.de/user_avatar/community.mp3tag.de/reddwarf4ever/32/22473_2.png) [@reddwarf4ever](https://community.mp3tag.de/u/reddwarf4ever)
#### Post date: [March 8, 2026, 7:09pm UTC](https://community.mp3tag.de/t/action-script-to-change-track-details/70842/14 "2026-03-08T19:09:46Z")

</div>

Hello

Thank you so much, been very helpful, now just need out this into practice, maybe tomorrow.

Why does %\_directory% have an \_ 🤔

👍👍👍

---

<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 8, 2026, 7:17pm UTC](https://community.mp3tag.de/t/action-script-to-change-track-details/70842/15 "2026-03-08T19:17:56Z")

</div>

I do not think that the

> [@reddwarf4ever](#):
>
> Why

question will really bring us forward.  
A general idea is: that is a non-tag property issued this time by the OS.  
Now it would be worthwhile to have a look at the documentation:

> **[Format Strings and Placeholders – Mp3tag Documentation](https://docs.mp3tag.de/format/)**
>
> Documentation on format strings and placeholders to describe the structure of file names and imported data. Mp3tag is the universal Tag Editor.

---

<div class="post-metadata">

### Author: ![reddwarf4ever](https://community.mp3tag.de/user_avatar/community.mp3tag.de/reddwarf4ever/32/22473_2.png) [@reddwarf4ever](https://community.mp3tag.de/u/reddwarf4ever)
#### Post date: [March 8, 2026, 9:08pm UTC](https://community.mp3tag.de/t/action-script-to-change-track-details/70842/16 "2026-03-08T21:08:25Z")

</div>

Deleted deleted deleted …

---

<div class="post-metadata">

### Author: ![reddwarf4ever](https://community.mp3tag.de/user_avatar/community.mp3tag.de/reddwarf4ever/32/22473_2.png) [@reddwarf4ever](https://community.mp3tag.de/u/reddwarf4ever)
#### Post date: [March 9, 2026, 4:49pm UTC](https://community.mp3tag.de/t/action-script-to-change-track-details/70842/17 "2026-03-09T16:49:31Z")

</div>

everything working perfect, thank you for your help

---

<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 16, 2026, 4:50pm UTC](https://community.mp3tag.de/t/action-script-to-change-track-details/70842/18 "2026-03-16T16:50:19Z")

</div>

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