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

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

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

Hi Ohrenkino,

Question update with morinfo now.

Regards

AJ

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

Hi Orenkino,

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

Regards

AJ

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)

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

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.

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

Hi Orenkino,

Thanks. I have got it working now. Brilliant.

Regards

AJ