# How do I program the mp3tag command Actions: I have an image with the same name, and I would like to save it over an existing image if they are not the same size?

**URL:** https://community.mp3tag.de/t/how-do-i-program-the-mp3tag-command-actions-i-have-an-image-with-the-same-name-and-i-would-like-to-save-it-over-an-existing-image-if-they-are-not-the-same-size/71084
**Category:** Support
**Created:** [April 19, 2026, 3:51pm UTC](https://community.mp3tag.de/t/how-do-i-program-the-mp3tag-command-actions-i-have-an-image-with-the-same-name-and-i-would-like-to-save-it-over-an-existing-image-if-they-are-not-the-same-size/71084 "2026-04-19T15:51:39Z")
**Posts on this page:** 16
**Page:** 1

<div class="post-metadata">

### Author: ![Sergius](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/ebca7d/32.png) [@Sergius](https://community.mp3tag.de/u/Sergius)
#### Post date: [April 19, 2026, 3:51pm UTC](https://community.mp3tag.de/t/how-do-i-program-the-mp3tag-command-actions-i-have-an-image-with-the-same-name-and-i-would-like-to-save-it-over-an-existing-image-if-they-are-not-the-same-size/71084/1 "2026-04-19T15:51:40Z")

</div>

Hello, I have a small problem: if I reduce the size of the image of my audio file and send this image with the same name to a folder using an Action command, Mp3tag adds the following character: (01) even though my image has the same name as the other unreduced image?

I'd like to be able to save my image over another image with the same name, even if they're not the same size.

Thanks in advance for your help.

artist-album.jpg (600)  
artist-album(01).jpg (200)

---

<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: [April 20, 2026, 6:08am UTC](https://community.mp3tag.de/t/how-do-i-program-the-mp3tag-command-actions-i-have-an-image-with-the-same-name-and-i-would-like-to-save-it-over-an-existing-image-if-they-are-not-the-same-size/71084/2 "2026-04-20T06:08:29Z")

</div>

AFAIK there is no function or setting in MP3tag to get a different behaviour.  
As such files are external files and not among the supported file types, it would be the task of an external task/tool to probably remove these files.  
E.g. a batch file, with the command  
`del *.jpg`  
would remove jpg files from the current work directory.  
It would be an extra step in the workflow, no automatism.

---

<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: [April 20, 2026, 6:26am UTC](https://community.mp3tag.de/t/how-do-i-program-the-mp3tag-command-actions-i-have-an-image-with-the-same-name-and-i-would-like-to-save-it-over-an-existing-image-if-they-are-not-the-same-size/71084/3 "2026-04-20T06:26:24Z")

</div>

> [@Sergius](#):
>
> Mp3tag adds the following character: (01) even though my image has the same name as the other unreduced image?

How do you do that?

If I do this by an action of the type "Export Cover to File" and don't mark "Allow duplicate covers" in the action dialogue files with the same name are overwritten.

---

<div class="post-metadata">

### Author: ![Sergius](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/ebca7d/32.png) [@Sergius](https://community.mp3tag.de/u/Sergius)
#### Post date: [April 20, 2026, 6:26am UTC](https://community.mp3tag.de/t/how-do-i-program-the-mp3tag-command-actions-i-have-an-image-with-the-same-name-and-i-would-like-to-save-it-over-an-existing-image-if-they-are-not-the-same-size/71084/4 "2026-04-20T06:26:57Z")

</div>

> [@ohrenkino](#):
>
> it would be the task of an external task/tool to probably remove these files.  
> E.g. a batch file, with the command  
> `del *.jpg`  
> would remove jpg files from the current work directory.

Hello @ohrenkino,

Thanks for your reply. 🙂

I was hoping there was a command in Mp3tag that could handle this...

As you said, I imagine it would be possible with a batch file (and an Mp3tag tools)... 🤔

---

<div class="post-metadata">

### Author: ![LyricsLover](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/c6cbf5/32.png) [@LyricsLover](https://community.mp3tag.de/u/LyricsLover)
#### Post date: [April 20, 2026, 6:31am UTC](https://community.mp3tag.de/t/how-do-i-program-the-mp3tag-command-actions-i-have-an-image-with-the-same-name-and-i-would-like-to-save-it-over-an-existing-image-if-they-are-not-the-same-size/71084/5 "2026-04-20T06:31:23Z")

</div>

> [@poster](#):
>
> How do you do that?
> 
> If I do this by an action of the type "Export Cover to File" and don't mark "Allow duplicate covers" in the action dialogue files with the same name are overwritten.

You are right, but the option is called " **Export** duplicate covers".  
If NOT checked/activated there is no (1) or (2) addition to the filename.

 ![image](https://community.mp3tag.de/uploads/default/original/3X/8/0/80c37b26c15d38e5b64c99cc26a6a3371ba1fd52.png)

"Overwrite ~~existing~~ identical covers with the same name" might be a clearer description.  
But with a switched function then.

---

<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: [April 20, 2026, 6:58am UTC](https://community.mp3tag.de/t/how-do-i-program-the-mp3tag-command-actions-i-have-an-image-with-the-same-name-and-i-would-like-to-save-it-over-an-existing-image-if-they-are-not-the-same-size/71084/6 "2026-04-20T06:58:30Z")

</div>

Are you sure that "Export duplicate covers" works like that?  
I just took 2 files which had the same cover in size and dimension.  
I exported the cover from these 2 files and really got only 1 picture file:  
`folder.jpg`  
To get a clean setup, I deleted this file, as next I reduced the dimensions of one of the cover and exported the covers again with the same setting.  
But this time I got  
`folder.jpg`  
`folder(1).jpg`  
I think that this option avoids that an identical file is created for each of the selected files. As soon as the files differ, a file with an index is created.

---

<div class="post-metadata">

### Author: ![Sergius](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/ebca7d/32.png) [@Sergius](https://community.mp3tag.de/u/Sergius)
#### Post date: [April 20, 2026, 7:00am UTC](https://community.mp3tag.de/t/how-do-i-program-the-mp3tag-command-actions-i-have-an-image-with-the-same-name-and-i-would-like-to-save-it-over-an-existing-image-if-they-are-not-the-same-size/71084/7 "2026-04-20T07:00:11Z")

</div>

Hi @poster and @LyricsLover,

Thanks guys for your help...

I just did a test: the "Export duplicate covers" box isn't checked...

It's not working; the first image is 600

The second image, with the same name, is 200 with (1)

---

<div class="post-metadata">

### Author: ![Sergius](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/ebca7d/32.png) [@Sergius](https://community.mp3tag.de/u/Sergius)
#### Post date: [April 20, 2026, 7:01am UTC](https://community.mp3tag.de/t/how-do-i-program-the-mp3tag-command-actions-i-have-an-image-with-the-same-name-and-i-would-like-to-save-it-over-an-existing-image-if-they-are-not-the-same-size/71084/8 "2026-04-20T07:01:58Z")

</div>

Hello @ohrenkino

You're right, I get the same result as you...

---

<div class="post-metadata">

### Author: ![LyricsLover](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/c6cbf5/32.png) [@LyricsLover](https://community.mp3tag.de/u/LyricsLover)
#### Post date: [April 20, 2026, 7:13am UTC](https://community.mp3tag.de/t/how-do-i-program-the-mp3tag-command-actions-i-have-an-image-with-the-same-name-and-i-would-like-to-save-it-over-an-existing-image-if-they-are-not-the-same-size/71084/9 "2026-04-20T07:13:49Z")

</div>

> [@ohrenkino](#):
>
> I think that this option avoids that an identical file is created for each of the selected files. As soon as the files differ, a file with an index is created.

That one is correct, as the [documentation](https://docs.mp3tag.de/actions/export-cover/) says:

> If **Export duplicate covers** is enabled, **identical** covers ( **same name and content** ) are exported.

---

<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: [April 20, 2026, 2:28pm UTC](https://community.mp3tag.de/t/how-do-i-program-the-mp3tag-command-actions-i-have-an-image-with-the-same-name-and-i-would-like-to-save-it-over-an-existing-image-if-they-are-not-the-same-size/71084/10 "2026-04-20T14:28:36Z")

</div>

The behaviour may have 2 different sources:  
If there are identical pictures in all the selected files, then only a single file would be sensible as all others would be redundant information. If the user still wants to get duplicates, it is MP3tag's task to take care of that. And that is triggered by the option in the action.

The second source is IMHO the OS that creates indexed files when it is requested to save different files under the same name. MP3tag has no influence on how the OS behaves under these circumstances.

Perhaps an amendment to the documentation like "Even it selected, duplicate, indexed files may be created if exported files have different properties besides the filename."

---

<div class="post-metadata">

### Author: ![Sergius](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/ebca7d/32.png) [@Sergius](https://community.mp3tag.de/u/Sergius)
#### Post date: [April 22, 2026, 2:58pm UTC](https://community.mp3tag.de/t/how-do-i-program-the-mp3tag-command-actions-i-have-an-image-with-the-same-name-and-i-would-like-to-save-it-over-an-existing-image-if-they-are-not-the-same-size/71084/11 "2026-04-22T14:58:39Z")

</div>

Hello @florian,

It would be great to have a new function added to Actions: " **Export cover to file**".

Adding a command would allow us to overwrite the image if the file name is the same but the image size is different.

Have a good day.

---

<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: [April 22, 2026, 3:03pm UTC](https://community.mp3tag.de/t/how-do-i-program-the-mp3tag-command-actions-i-have-an-image-with-the-same-name-and-i-would-like-to-save-it-over-an-existing-image-if-they-are-not-the-same-size/71084/12 "2026-04-22T15:03:07Z")

</div>

I think this would be dangerous as it would lead to loss of data if accidentally covers of with different properties get exported.  
As there is no function to compare the properties of embedded pictures between files, the last export would win.  
So I think it is a fair deal to ask the user to delete any external files if they are not needed any more.  
Picture files in the file system, BTW, are not even supported by MP3tag. SO MP3tag does not really know that they are there and therefore relies on the OS functions.

---

<div class="post-metadata">

### Author: ![LyricsLover](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/c6cbf5/32.png) [@LyricsLover](https://community.mp3tag.de/u/LyricsLover)
#### Post date: [April 22, 2026, 3:32pm UTC](https://community.mp3tag.de/t/how-do-i-program-the-mp3tag-command-actions-i-have-an-image-with-the-same-name-and-i-would-like-to-save-it-over-an-existing-image-if-they-are-not-the-same-size/71084/13 "2026-04-22T15:32:02Z")

</div>

> [@ohrenkino](#):
>
> So I think it is a fair deal to ask the user to delete any external files if they are not needed any more.

This way OR alternatively, **allow** the user to decide (with an additional option) whether to always overwrite exported covers, regardless of whether the content is the same.

---

<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: [April 22, 2026, 3:41pm UTC](https://community.mp3tag.de/t/how-do-i-program-the-mp3tag-command-actions-i-have-an-image-with-the-same-name-and-i-would-like-to-save-it-over-an-existing-image-if-they-are-not-the-same-size/71084/14 "2026-04-22T15:41:07Z")

</div>

> [@LyricsLover](#):
>
> **allow** the user to decide

I would set that option to always "on" - which would then disable the safeguard.  
So in the end it would mean that the last export would win.  
I would prefer an additional message that tells you that different files were found.  
Also, I would prefer a behaviour that if an existing file with the same name requires the index, then the existing file should get it and not the newly written one - as I would assume that the user actually wanted a file of the set name and not one with the index.  
It would then also be easier to delete the files with the index number than the ones with the plain name and then rename the indexed files to the plain name.

---

<div class="post-metadata">

### Author: ![Sergius](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/s/ebca7d/32.png) [@Sergius](https://community.mp3tag.de/u/Sergius)
#### Post date: [April 22, 2026, 4:22pm UTC](https://community.mp3tag.de/t/how-do-i-program-the-mp3tag-command-actions-i-have-an-image-with-the-same-name-and-i-would-like-to-save-it-over-an-existing-image-if-they-are-not-the-same-size/71084/15 "2026-04-22T16:22:34Z")

</div>

> [@ohrenkino](#):
>
> So I think it is a fair deal to ask the user to delete any external files if they are not needed any more.

> [@LyricsLover](#):
>
> This way OR alternatively, **allow** the user to decide (with an additional option) whether to always overwrite exported covers, regardless of whether the content is the same.

A huge thank you to @ohrenkino for this fantastic idea and for explaining it in such detail. 😃 👍

Thank you to @LyricsLover for expanding on ohrenkino's idea and adding this solution: allowing the user to decide (with an additional option) whether to always overwrite exported covers, regardless of whether the content is the same. 😉

Thank you both; this would prevent data loss.

I'm amending my request to @Florian, thanks to ohrenkino's excellent suggestion and the addition of LyricsLover's idea, which I find much less risky in terms of data loss.

---

<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: [May 20, 2026, 4:23pm UTC](https://community.mp3tag.de/t/how-do-i-program-the-mp3tag-command-actions-i-have-an-image-with-the-same-name-and-i-would-like-to-save-it-over-an-existing-image-if-they-are-not-the-same-size/71084/16 "2026-05-20T16:23:14Z")

</div>

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