# Batch to Remove 1st then Add

**URL:** https://community.mp3tag.de/t/batch-to-remove-1st-then-add/46705
**Category:** Support
**Created:** [October 12, 2019, 3:47pm UTC](https://community.mp3tag.de/t/batch-to-remove-1st-then-add/46705 "2019-10-12T15:47:16Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![mrralan](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/ec9cab/32.png) [@mrralan](https://community.mp3tag.de/u/mrralan)
#### Post date: [October 12, 2019, 3:47pm UTC](https://community.mp3tag.de/t/batch-to-remove-1st-then-add/46705/1 "2019-10-12T15:47:16Z")

</div>

Currently, I remove all tags first. Then I do a Filename - Tag. Then I add a comment that is the same for mostly all my tags. How can I program these 3 operations into one command?

---

<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 12, 2019, 8:26pm UTC](https://community.mp3tag.de/t/batch-to-remove-1st-then-add/46705/2 "2019-10-12T20:26:12Z")

</div>

I would leave out the removal of all tags and update only those that are incorrect.  
If you still want to do it, use an action of the type "Remove fields except" and leave the field %dummy% as the last one.  
An import of data from filenames can be run in an action with an action of the type "Guess value" - the syntax is the same as in the function Convert\>Filename-Tag which means it works only for files with the same pattern in the filename.  
To set a certain field, e.g. COMMENT, to a certain value, use an action of the type "Format value".  
Actions can be grouped in an action group.  
To see more about actions, see the FAQs

> [@Actions and batch-operations](https://community.mp3tag.de/t/actions-and-batch-operations/967):
>
> Mp3tag provides a variety of actions, which can be applied to filenames and tags. The actions are grouped together into named sets (action groups), which can be applied independently via Alt + 6. If you do not want to create a reusable action group for applying one single action, the Actions (Quick) toolbar button or keyboard shortcut Shift + Alt + 6 can be used. How to [create a new action](https://community.mp3tag.de/t/actions/967/2)? How to ... [change upper/lower case of tag fields or filenames](https://community.mp3tag.de/t/actions/967/3)? [replace the string “xyz” in tag-fields …](https://community.mp3tag.de/t/actions/967/4)

---

<div class="post-metadata">

### Author: ![mrralan](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/ec9cab/32.png) [@mrralan](https://community.mp3tag.de/u/mrralan)
#### Post date: [October 13, 2019, 2:54pm UTC](https://community.mp3tag.de/t/batch-to-remove-1st-then-add/46705/3 "2019-10-13T14:54:16Z")

</div>

Thanks but I am unsure how to use the Guess Value. What do I put in for SOURCE FORMAT and GUESSING PATTERN to equal Convert\> Filename-Tag?

---

<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, 2019, 3:00pm UTC](https://community.mp3tag.de/t/batch-to-remove-1st-then-add/46705/4 "2019-10-13T15:00:38Z")

</div>

Have you tried to import data from the filename with Convert\>Filename-Tag?  
As you do not show us a typical filename, I can't tell you what to put in the format string.  
The source string is `%_filename%` or even `%_directory%\%_filename%`

---

<div class="post-metadata">

### Author: ![mrralan](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/ec9cab/32.png) [@mrralan](https://community.mp3tag.de/u/mrralan)
#### Post date: [October 13, 2019, 3:30pm UTC](https://community.mp3tag.de/t/batch-to-remove-1st-then-add/46705/5 "2019-10-13T15:30:31Z")

</div>

I see...yes, it is %\_directory%%\_filename%. The Convert function doesn't show this...it only shows the Format String. Thanks for the help.

---

<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, 2019, 3:32pm UTC](https://community.mp3tag.de/t/batch-to-remove-1st-then-add/46705/6 "2019-10-13T15:32:26Z")

</div>

if you use the convert function with a string like  
`%album%\%track% - %title%`  
you can also retrieve information from the folder structure.  
See the Howtos:

> [@Converters to rename files or to import tags](https://community.mp3tag.de/t/converters-to-rename-files-or-to-import-tags/8016/3):
>
> How to import parts of the filename into the tag? Importing tags from filenames and directory names can be done by using the [Converter \> Filename - Tag] Converter \> Filename - Tag. The basic concept is the notion of a format string which describes the structure of the name to import from. The format string is built of either standard text (e.g., Music), placeholders (such as %artist%, %title%, ...), or backslash characters \ that denote directory structures. Here is an example that imports t…

---

<div class="post-metadata">

### Author: ![mrralan](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/m/ec9cab/32.png) [@mrralan](https://community.mp3tag.de/u/mrralan)
#### Post date: [October 13, 2019, 6:46pm UTC](https://community.mp3tag.de/t/batch-to-remove-1st-then-add/46705/7 "2019-10-13T18:46:35Z")

</div>

Thanks for that info.

---

<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:28pm UTC](https://community.mp3tag.de/t/batch-to-remove-1st-then-add/46705/8 "2026-02-09T12:28:17Z")

</div>


