How to get Picard writing the original release date / year of a recording?

Will this pull the full date if there is a release/recording with the same year but no date? For instance let’s say the US version of an album is dated to 1973-09-17 but the European release is only dated to 1973. Which date will the variable pull?

I think you will find answers on that here:

Thank you very much hiccup! It works fine for me now
(fortunately didn’t have to wait for 3 years, like you)

Good to hear!

There are thousands of pieces of software and features that I never had to wait for, but other people had to.
Circle of life kind of thing. :wink:

Hi everyone.
I’ve been using Picard for a number of years, but this is my first delve into the world of scripts, as I’ve 100’s of compilations with the wrong year and need to batch change just the date to be, well, pretty much exactly what Hiccup is saying - the year of recording of that version of the track.

I’m on OSX 10.13, so I’m running Picard 2.6.3.
I’ve added the script “$if($gt($left(%_recording_firstreleasedate%,4),$get(origyear)),$set(firstrelyear,%origyear%),$set(firstrelyear,$left(%_recording_firstreleasedate%,4)))”

So I’d assumed what I’d do now is simply scan all the tracks and run the script.
Is that right?
I’ve set my preferences to ignore compilations when the files are scanned.

Also, is there an easy way to stop anything except the year tag being updated?
Everything else about the compilations is done…artist, album name, track name, album art…I literally only want to change the ‘year’ field.
(I’ve tested going in and selecting all fields except ‘Date’, ‘firstrelyear’, ‘Original Release Date’ and ‘Original Year’, then clicking ‘Use Original Values’ but it seems not to do anything and I can’t get some fields to keep originals; do I remove them? It looks like ‘remove’ means totally remove that field…)

Up to now I’ve used Picard just for tracks I have no data for, but if I can use it to do this job, it’d be amazing!

Thanks all for your work!

Hello good afternoon,
I’ve been looking for a long time on this topic, and I think the solution to what I’m looking for is right here: recording the oldest data of a song release. As I’m new to this area of ​​scripts, I would like to ask for help running this code. How should I proceed in Picard?
Thanks for the help in advance.

You can find explanations about plugins (and scripts) in Extending Picard — MusicBrainz Picard v2.8.1 documentation

That’s a good starting point.


Hi @rafapratas - welcome to the forum.

As I have this script working actively in my Picard configuration I will show you how to set it up.

Firstly I am expecting you to be running the latest version of Picard, click Help > Check for Update to confirm you are on the latest version:


  1. With Picard Open click Options > Options to open the Options dialog window:

  2. Click on Scripting from the left Tree Menu

  3. Click Add new tagger script - It will create an entry called “My Script (1)”

  4. Double click on My Script (1) and change the name to GetOldestDate

  5. With GetOldestDate selected, copy the following into the right pane:

  1. Ensure Enable Tagger Script(s) is ticked and that GetOldesteDate is ticked too, your window should look similar to this:

  2. Click “Make It So!” to save changes

Now find a track, the Date ID3 field should now take the earliest date for that recording.

(the example above is a CD compilation from 2003, but the song is from 1967, as you can see the Date field is set correctly)

Hope this helps