# How do I move a part of the filename that is in various positions

**URL:** https://community.mp3tag.de/t/how-do-i-move-a-part-of-the-filename-that-is-in-various-positions/49047
**Category:** Support
**Created:** [May 23, 2020, 10:35am UTC](https://community.mp3tag.de/t/how-do-i-move-a-part-of-the-filename-that-is-in-various-positions/49047 "2020-05-23T10:35:29Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![a101](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/d26b3c/32.png) [@a101](https://community.mp3tag.de/u/a101)
#### Post date: [May 23, 2020, 10:35am UTC](https://community.mp3tag.de/t/how-do-i-move-a-part-of-the-filename-that-is-in-various-positions/49047/1 "2020-05-23T10:35:29Z")

</div>

How do I move a part of the filename that is in various positions.  
I have a list of files with year as part of it.  
The part that is year is in various positions and I want to move it to tag "year".  
Can it be done?

"A:\A & L files\Albums\Barry White\The Collection\01 - You're The First, The Last, My Everything 1974 - Barry White.mp3" -\>  
comment: 1974

"A:\A & L files\Albums\Barry White\The Collection\02 - You See The Trouble With Me 1976 - Barry White.mp3" -\>  
comment: -

"A:\A & L files\Albums\Barry White\The Collection\03 - Can't Get Enough Of Your Love Babe 1974 - Barry White.mp3" -\>  
comment: 1974

"A:\A & L files\Albums\Barry White\The Collection\04 - I'll Do For You Anything You Want Me To 1975 - Barry White.mp3" -\>  
comment: Me

"A:\A & L files\Albums\Barry White\The Collection\05 - Just The Way You Are 1978 - Barry White.mp3" -\>  
comment: Barry

"A:\A & L files\Albums\Barry White\The Collection\06 - Walking In The Rain (With The One I Love) 1972 - Barry White.mp3" -\>  
comment: I

Thanks

AJ

---

<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: [May 23, 2020, 10:54am UTC](https://community.mp3tag.de/t/how-do-i-move-a-part-of-the-filename-that-is-in-various-positions/49047/2 "2020-05-23T10:54:22Z")

</div>

As you do not show us the filename variations, the answer is "probably".  
Perhaps a look at the FAQs helps:

> [@Converters to rename files or to import tags](https://community.mp3tag.de/t/converters-to-rename-files-or-to-import-tags/8016):
>
> Mp3tag provides a variety of possibilities to get tag information from parts of the filename or rename files based on the information stored in the tag of a file. The base concept behind all converters in Mp3tag is the so called format string, which describes a pattern (or template) of a filename or a line in a tag-list file. A format string consists of any characters and predefined placeholders or scripting functions. Every placeholder begins with the percent sign %, followed by a tag field n…

---

<div class="post-metadata">

### Author: ![a101](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/d26b3c/32.png) [@a101](https://community.mp3tag.de/u/a101)
#### Post date: [May 23, 2020, 12:56pm UTC](https://community.mp3tag.de/t/how-do-i-move-a-part-of-the-filename-that-is-in-various-positions/49047/3 "2020-05-23T12:56:04Z")

</div>

Hi Ohrenkino,

Question update with morinfo now.

Regards

AJ

---

<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: [May 23, 2020, 12:57pm UTC](https://community.mp3tag.de/t/how-do-i-move-a-part-of-the-filename-that-is-in-various-positions/49047/4 "2020-05-23T12:57:56Z")

</div>

Ah, thank you.  
Try an action of the type "Guess value"  
Source: `$regexp(%_filename%,'.* (\d+) -.*',$1)`  
Format String: `%year%`

---

<div class="post-metadata">

### Author: ![a101](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/d26b3c/32.png) [@a101](https://community.mp3tag.de/u/a101)
#### Post date: [May 23, 2020, 1:10pm UTC](https://community.mp3tag.de/t/how-do-i-move-a-part-of-the-filename-that-is-in-various-positions/49047/5 "2020-05-23T13:10:13Z")

</div>

Hi Orenkino,

Have tried that and there is no reponse in the preview field.

Regards

AJ

---

<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: [May 23, 2020, 1:21pm UTC](https://community.mp3tag.de/t/how-do-i-move-a-part-of-the-filename-that-is-in-various-positions/49047/6 "2020-05-23T13:21:21Z")

</div>

AFAIK there is no action that has a preview....  
(Only the Converters have - so if you want to test the regular expression, use Convert\>Tag-Tag)

---

<div class="post-metadata">

### Author: ![a101](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/d26b3c/32.png) [@a101](https://community.mp3tag.de/u/a101)
#### Post date: [May 23, 2020, 1:28pm UTC](https://community.mp3tag.de/t/how-do-i-move-a-part-of-the-filename-that-is-in-various-positions/49047/7 "2020-05-23T13:28:07Z")

</div>

Hi Orenkino,

When the format string is correct it is shown below the string input field.  
I have tried using multiple %dummy% and that works for one, but because the part that I want to move is in different positions in different files it moves different parts of the filename.

Regards

AJ

---

<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: [May 23, 2020, 1:31pm UTC](https://community.mp3tag.de/t/how-do-i-move-a-part-of-the-filename-that-is-in-various-positions/49047/8 "2020-05-23T13:31:00Z")

</div>

> [@a101](#):
>
> I have tried using multiple %dummy% and that works for one

Exactly - and as %dummy% is not specific, I used (\d+) to get the number.  
Oh, and the more I think about it:  
You could use Convert\>tag-Tag straightaway.  
Select as field YEAR  
Format string: `$regexp(%_filename%,'.* (\d+) -.*',$1)`  
This should show the 19xx in the preview.

---

<div class="post-metadata">

### Author: ![a101](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/d26b3c/32.png) [@a101](https://community.mp3tag.de/u/a101)
#### Post date: [May 23, 2020, 1:46pm UTC](https://community.mp3tag.de/t/how-do-i-move-a-part-of-the-filename-that-is-in-various-positions/49047/9 "2020-05-23T13:46:45Z")

</div>

Hi Orenkino,

01 – You’re the First, The Last, My Everything 1974 – Barry White.mp3

That is what the filename looks like in the folder.

Maybe I am doing something wrong as I am still not getting a response.

Regards

AJ

---

<div class="post-metadata">

### Author: ![a101](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/a/d26b3c/32.png) [@a101](https://community.mp3tag.de/u/a101)
#### Post date: [May 23, 2020, 2:11pm UTC](https://community.mp3tag.de/t/how-do-i-move-a-part-of-the-filename-that-is-in-various-positions/49047/10 "2020-05-23T14:11:00Z")

</div>

Hi Orenkino,

Thanks. I have got it working now. Brilliant.

Regards

AJ

---

<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/how-do-i-move-a-part-of-the-filename-that-is-in-various-positions/49047/11 "2026-02-09T12:28:36Z")

</div>


