Scripting: Replace in "Comment" (.m4a)

Tags: #<Tag:0x00007fa5cc057f48> #<Tag:0x00007fa5cc057d90>

I want to replace somenting in the (normal) comment field of .m4a files:
$set(comment,$replace(%comment%, Op. , op. ))

This doesn’t work. Nothing will be changed (as I see it in Picard).
The log view looks good, but nothing is changed
D: 17:06:59,349 file.update:614: Updating file <MP4File "1-01 - Auf's Korn! - Kopie.m4a">
D: 17:06:59,352 file.update:614: Updating file <MP4File '1-02 - Frühlingsstimmen - Kopie.m4a'>
Also after save thre is no change in the files.

Just to set something to the common field works:
$set(comment,Lorem ipsum)
I see the changes in Picard.

What is wrong?

Now mp3:
I’d like to add someting the an existing comment, but it’s not working: I can not access the original comment.

$set(comment:,ABC)
$set(comment:,%comment:%123)

=> ABC123

$set(comment:,%comment:%123)
=> 123
(but old comment values are lost)

That’s because scripting does not have access to the file variables. Please see

3 Likes

Oh, Thx!
I suspected something like this and I hope it will be changed.

???
I’m not sure what this means and/or what is wrong. Will my reply be deleted? What does “flagged” mean here?

It is because he has withdrawn his comment. Until it has been deleted, you can see what he wrote by clicking on the edit pencil (beside the post time).

1 Like

Sorry to confuse things. My answer was a total guess and it turned out to be rubbish. So I deleted my own post. The idea was to avoid confusion - not cause it. :smile:

1 Like