Extracting and moving content from tags into other tags

It happened to me to use material from friends who use a mysterious way of tagging
*file shows the name this way:
name-surname-i-am- the nicest-boy
*tag title is shown this way
name surname- i am the nicest boy
*tag artist shows the friends name
iskandar zulkarnain
*tag album show the album etc

Is there a fast way to
1/ move the tag artist field into the album field
2/ 'cut' name surname from the title field and paste into the artist field but retain the real title on the title tag?
For the moment i do this work manually .Sometimes it s a lot of tasking

Thank you for yur help

I'm not sure if I understand what you want to do:

1.) With move the tag artist field into album field you mean you want to delete it in the artist field (blank the artist field) and overwrite the current content in the album field with the content from artist field completely?

2.) If you 'cut' something, you delete it at the source and don't retain it. Do you want to COPY the name and surname from title into the artist field?

3.) What do you mean with "real title"?

It would be easier to understand if you show us some real example tags with real content BEFORE and AFTER the changes you want to do. So we can see what exactly do you want to COPY or DELETE and what to keep and what to remove.

this is the tagging before the process
the


this is the result

I hop you understand on what i do with two options
In the first two files i kept the underscore while in the bottom two i removed them There are many cases tat this underscore is replaced with standard dash (-)

To be sure:

1.) You want to move the content of ARTIST ("Husein") to ALBUM (existing content of ALBUM will be overwritten with "Husein")

2.) You want to move the content in TITLE before the underscore ("ali ahamed anwar") to ARTIST (existing content in ARTIST will be overwritten with "ali ahamed anwar")

3.) You want to delete the space the underscore and space at the start of TITLE and at the end of ARTIST?

my idea is that the content of the 'artist' column moves to album as you could do that in an excel spreadsheet Just mark copy and paste it for much faster service Posters can vary

Yes but the same manner as above . Singer names can differ as the posters

Good idea !

You could try it with this 3 Actions with Action type "Format value":

1.) Field: ALBUM
Format String:
%ARTIST%

2.) Field: ARTIST
Format String:
$regexp(%TITLE%,(.*) _ (.*),$2)

Short explanation: Create 2 capture groups, one with the content before space underscore space and one with the content after space underscore space. Put the second content into the field ARTIST.

3.) Field: TITLE
Format String:
$regexp(%TITLE%,(.*) _ (.*),$1)

Short explanation: Create 2 capture groups, one with the content before space underscore space and one with the content after space underscore space. Put the first content into the field TITLE.

You can put these 3 Actions in 1 Action Group and it looks like this:
image

the PS : hope that this idea is easy to you to implement such automation.

OK thank you very much

The linked documenation will help you to create this actions. :wink:
Please ask us for specific help if you need support to create these actions,


Somethin goes bad Unfortunately the singer goes to title and tile goes to artist..
addition
THIS HAPPENED AFTER MAKING THE ABOVE ACTION AND INSISTED IN THIS WAY WITH THE FORMAT AS ALREADY NOTICED: IN TITLE FIELD
SINGER SINGER SINGER - TITLE TITLE TITLE

To use a regular expression, the original content has to EXACTLY match the expression.
Your TITLE in the last example does not have an underscore and does not have the artist in front of the title name as it was shown in the first example.

Such an automation only works, if your source tag TITLE contains always the same parts, like
some artist name before the space underscore space _ followed by some title name after the underscore

In your last example, there is nothing in TITLE what could be used to divide parts into other tags.

i tried many times to do that ut as the problem continued i desist from experimenting
i will possibly try to exchange the artist and title fields by using dummy fields

You should try to get some structure in your tags and/or filename.
It is impossible to use any automation with a filename like
ali-ahamed-anwar-cinta-pandang-pertama-1982.mp3
or TITLEs that contain either
a romzi
or
ali ahamed anwar - cinta pandang pertama (1982)

I m experimenting in the tags .instead f what i expected the singer remains in the title and title movies in the artist field

Finally i found the solution using this field exchange to restore the names adna addied int the underscore
Unnecessary text in titles as this in (parentheses) as in the photo

Στιγμιότυπο οθόνης 2022-08-07 184038

d6

FOR ME THE SOLUTION IS SHOWN ABOVE
JUST USING UNUSED FIELDS MOVIE THE CONTENT OF THESE FIELDS TITLE AND ARTIST ]AND FINALLY REPLACE THEM

1 Like

I'm chiming in here, because the post marked as solution is most likely only a solution for the special situation the OP is dealing with.

A more general solution which is probably also helpful for other users potentially finding this topic in the future is

And as a side note as a moderator/admin of this community: @zach, did you know that writing in all caps is considered shouting on the Internet?

i know that since 90s but it was as ADD-ON INFO TO THE ORIGINAL ARTICLE as a way to show some difference

new example of not successful action


the singer is shown in the left of the underscore


after the action noticed in the post 5 the singer remains in the title while the title moves to the singer field .this is the reason i played with fields to restore this error


doing the field inversion restores the contents in the proper fields

I kept both versions just in case it ....works later !

You can just swap the use of $1 and $2 (holding the matched content from the regular expression):

If you want to copy the part BEFORE the space underscore space from TITLE to ARTIST, use an Action with "Format value":
Field: ARTIST
Format String:
$regexp(%TITLE%,(.*) _ (.*),$1)

If you want to keep only the part AFTER the space underscore space in TITLE, use
Field: TITLE
Format String:
$regexp(%TITLE%,(.*) _ (.*),$2)

Please don't forget to execute the first step (copy content from ARTIST to ALBUM) before you use the above 2 actions.

1 Like

yes did tat with duplicate and worked ! thank you once again !
so before means on the left and after means on the right
this is what we call "lost in translation" :grinning:

1 Like