# Copying A to B when C

**URL:** <https://community.mp3tag.de/t/copying-a-to-b-when-c/19741>\
**Category:** Support\
**Created:** [January 30, 2018, 11:47am UTC](https://community.mp3tag.de/t/copying-a-to-b-when-c/19741 "2018-01-30T11:47:02Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zerow](https://community.mp3tag.de/user_avatar/community.mp3tag.de/zerow/32/11379_2.png) [@Zerow](https://community.mp3tag.de/u/Zerow)\
**Post date:** [January 30, 2018, 11:47am UTC](https://community.mp3tag.de/t/copying-a-to-b-when-c/19741/1 "2018-01-30T11:47:02Z")

</div>

Could someone please enlighten me, how to copy the whole content of the tag field ALBUM to the tag field TEMPORARY, but only when there is a "" in that field [and if is not not present then just leave the TEMPORARY clean]?

I can format value the TEMPORARY field with  
$if(X,%ALBUM%,)but I do not know how to replace that X with my being the go-sign

---

<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:** [January 30, 2018, 2:58pm UTC](https://community.mp3tag.de/t/copying-a-to-b-when-c/19741/2 "2018-01-30T14:58:37Z")

</div>

have a look at the $char() function where you use the character code

---

<div class="post-metadata">

**Author:** ![DetlevD](https://community.mp3tag.de/user_avatar/community.mp3tag.de/detlevd/32/123_2.png) [@DetlevD](https://community.mp3tag.de/u/DetlevD)\
**Post date:** [January 30, 2018, 7:40pm UTC](https://community.mp3tag.de/t/copying-a-to-b-when-c/19741/3 "2018-01-30T19:40:57Z")

</div>

> [@Zerow](#):
>
> Could someone please enlighten me, how to copy the whole content of the tag field ALBUM to the tag field TEMPORARY, but only when there is a "" in that field [and if is not not present then just leave the TEMPORARY clean]? ...

Hmm maybe ...  
TEMPORARY \<== $ifgreater($strstr(%ALBUM%,'word'),0,%ALBUM%,%TEMPORARY%)  
... or ...  
TEMPORARY \<== $ifgreater($strstr(%ALBUM%,'word'),0,%ALBUM%,)

DD.20180130.2140.CET

---

<div class="post-metadata">

**Author:** ![Zerow](https://community.mp3tag.de/user_avatar/community.mp3tag.de/zerow/32/11379_2.png) [@Zerow](https://community.mp3tag.de/u/Zerow)\
**Post date:** [January 31, 2018, 8:47pm UTC](https://community.mp3tag.de/t/copying-a-to-b-when-c/19741/4 "2018-01-31T20:47:56Z")

</div>

> [@DetlevD](#):
>
> Hmm maybe ...  
> TEMPORARY \<== $ifgreater($strstr(%ALBUM%,'word'),0,%ALBUM%,%TEMPORARY%)

This works, thank you

> [@DetlevD](#):
>
> TEMPORARY \<== $ifgreater($strstr(%ALBUM%,'word'),0,%ALBUM%,)

But this returns a "[INVALID $IFGREATER SYNTAX]" error

How about making that code a little safer to use? In that it would only execute itself if there would be only a "Word" and not:

- word
- Wordd
- Word0
- word0  
[with the 0 meaning any number] or probably any kind of word-ish data?

---

<div class="post-metadata">

**Author:** ![DetlevD](https://community.mp3tag.de/user_avatar/community.mp3tag.de/detlevd/32/123_2.png) [@DetlevD](https://community.mp3tag.de/u/DetlevD)\
**Post date:** [February 1, 2018, 7:17am UTC](https://community.mp3tag.de/t/copying-a-to-b-when-c/19741/5 "2018-02-01T07:17:34Z")

</div>

> [@Zerow](#):
>
> ... But this returns a "[INVALID $IFGREATER SYNTAX]" error ...  
> TEMPORARY \<== $ifgreater($strstr(%ALBUM%,'word'),0,%ALBUM%,)

No, it does not.

> [@Zerow](#):
>
> ... How about making that code a little safer to use? In that it would only execute itself if there would be only a "Word" and not: ...

For example:  
TEMPORARY \<== $ifgreater($strstr(%ALBUM%,' word'),0,%ALBUM%,%TEMPORARY%)  
... or ...  
TEMPORARY \<== $ifgreater($strstr(%ALBUM%,'word '),0,%ALBUM%,%TEMPORARY%)  
... or ...  
TEMPORARY \<== $ifgreater($strstr(%ALBUM%,' word '),0,%ALBUM%,%TEMPORARY%)

> [@Zerow](#):
>
> ... In that it would only execute itself ...

Hmm, "execute itself", how does it work in Mp3tag?

DD.20180201.0932.CET

---

<div class="post-metadata">

**Author:** ![Zerow](https://community.mp3tag.de/user_avatar/community.mp3tag.de/zerow/32/11379_2.png) [@Zerow](https://community.mp3tag.de/u/Zerow)\
**Post date:** [February 13, 2018, 8:27pm UTC](https://community.mp3tag.de/t/copying-a-to-b-when-c/19741/6 "2018-02-13T20:27:38Z")

</div>

> [@DetlevD](#):
>
> > [@Zerow](#):
> >
> > ... But this returns a "[INVALID $IFGREATER SYNTAX]" error ...  
> > TEMPORARY \<== $ifgreater($strstr(%ALBUM%,'word'),0,%ALBUM%,)
> 
> No, it does not.

You are correct, now it works; I must have messed up something back there.

> [@DetlevD](#):
>
> > [@Zerow](#):
> >
> > ... How about making that code a little safer to use? In that it would only execute itself if there would be only a "Word" and not: ...
> 
> For example:

Hmmm

I am trying hard to recall what was that I was trying to achieve back then, but as I am reorganizing my entire system for a couple of days now, I just do not remember. But I know I used the first code that you kindly provided, so thank you

[I somehow implemented my safe guards in a "manual way" - with filtering expression that is]

> [@DetlevD](#):
>
> > [@Zerow](#):
> >
> > ... In that it would only execute itself ...
> 
> Hmm, "execute itself", how does it work in Mp3tag?

If the requirements are met then the code works, and if not it does not to its bidding [as it just does nothing because the data requirements are not met and not because the code itself is erroneously written]

So one again thank you very much for your time @DetlevD

---

<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:27pm UTC](https://community.mp3tag.de/t/copying-a-to-b-when-c/19741/7 "2026-02-09T12:27:12Z")

</div>


