# Filename to Filename Conversion

**URL:** <https://community.mp3tag.de/t/filename-to-filename-conversion/18844>\
**Category:** Support\
**Created:** [March 29, 2017, 3:22pm UTC](https://community.mp3tag.de/t/filename-to-filename-conversion/18844 "2017-03-29T15:22:08Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jcusfs](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/j/3d9bf3/32.png) [@jcusfs](https://community.mp3tag.de/u/jcusfs)\
**Post date:** [March 29, 2017, 3:22pm UTC](https://community.mp3tag.de/t/filename-to-filename-conversion/18844/1 "2017-03-29T15:22:08Z")

</div>

I am working with a large number of files that all have consistent filenames. Each file name consists of three parts, %1, %2, and %3. Often, parts %1 and %2 are the same for multiple files. However, one part of the filename %3, is a person’s actual name. This avoid two files having the exact same name. For demo and documentation purposes, I would like to convert the actual person’s name to a different placeholder name, perhaps “Person 001” (you know, to protect the innocent). I know filename-filename conversion can almost do this. Starting with: %1 %2 %3, I can convert this to: %1 %2 Person

Is there any way I can get mp3tag to increment a number so that each filename will end up with a unique “Person” identifier(e.g. Person 001, Person 002, Person 003, etc.)? I’m looking that $add(x,y) scripting function, but would welcome some help. Thanks!

---

<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 29, 2017, 4:33pm UTC](https://community.mp3tag.de/t/filename-to-filename-conversion/18844/2 "2017-03-29T16:33:35Z")

</div>

I am not sure what you want to do:  
Do you want to get a unique Person xyz for each individual person e.g.  
Frank is Person001  
Peter is Person002

and every time that Frank is part of the name you want to insert "Person001"?

I doubt that this is possible without export.

If, on the other hand, you only want to add an increasing number, there is the counter  
%\_counter%  
You can add that to the filename.  
The counter does not reset, though, but counts all elements in a selection.

---

<div class="post-metadata">

**Author:** ![jcusfs](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/j/3d9bf3/32.png) [@jcusfs](https://community.mp3tag.de/u/jcusfs)\
**Post date:** [March 29, 2017, 5:39pm UTC](https://community.mp3tag.de/t/filename-to-filename-conversion/18844/3 "2017-03-29T17:39:00Z")

</div>

Very cool! Almost works. I have filename %1\_%2\_%3. I have the following conversion:

%1\_%2\_Person$num(%\_counter%,3)

I'm getting the conversion with the number stating at "000". However, the counter does not increment and keeps generating "000". The process stops when mp3tag runs into the occurrence where %1 and %2 was an exact match of a preceding file because the counter is stuck at "000". Thank you so much for any advice.

---

<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 29, 2017, 5:45pm UTC](https://community.mp3tag.de/t/filename-to-filename-conversion/18844/4 "2017-03-29T17:45:02Z")

</div>

What about an action of the type "Format value" for _FILENAME  
Format string: $regexp(%filename%,(.\*)(.\*)_(.\*),$1\_$2\_Person$num(%\_counter%,3))

---

<div class="post-metadata">

**Author:** ![jcusfs](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/j/3d9bf3/32.png) [@jcusfs](https://community.mp3tag.de/u/jcusfs)\
**Post date:** [March 29, 2017, 6:06pm UTC](https://community.mp3tag.de/t/filename-to-filename-conversion/18844/5 "2017-03-29T18:06:21Z")

</div>

THANK YOU!!

---

<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:26pm UTC](https://community.mp3tag.de/t/filename-to-filename-conversion/18844/6 "2026-02-09T12:26:45Z")

</div>


