I have a collection of music files (~200/batch) that I need to tag through Picard. The files have no metadata, and the fingerprinting tool is very inefficient (<50% mean accuracy).

However, the titles are like this: "(Song Name)-(Artist).(format)", and they are almost perfect. I can write a sed to extract these.

I need a way to be able to write a custom script that allows me to use the Picard's lookup feature, with the parameters I extract from sed (in-script) from the filename, and do a lookup. Is that possible?

I am looking for guidelines, but an example would be great.

As @terdon requested, more details:

  • Picard has two modes of identifying a song: 1) Acoustic Fingerprinting, and 2) Lookup using existing metadata
  • For some reason, the first method, ie Acoustic Fingerprinting is giving me very poor result on a certain set of songs
  • However, my songs already have the correct Artist Name, Track Title in the filename, I just need to lookup the track to get Year, Cover Image etc.
  • The default lookup script (internal to Picard?) is using the complete file name, which has garbage in it to do a lookup, leading to inferior results
  • I would like to specify which part of the file name to use for the lookup, as I mention above.

Something like:

i="Track Name/ File Name"
$artist="sed -r 's/.../\1/'" $i
$track="sed -r 's/...\2/'" $i
lookup($i, $artist, $track)

Of course the scripting language for Picard may be different.

  • Please edit your question and add an example of the picard command you would want to run. What is this "lookup feature"? If you make it more explicit, people with knowledge of scripting but no knowledge of picard will be able to help.
    – terdon
    Oct 24, 2015 at 15:04
  • @terdon I edited.
    – xyz
    Oct 24, 2015 at 16:03
  • 1
    Ah, OK, since you mentioned a script, I assumed you would be launching picard from the command line. AB's answer below should work for you.
    – terdon
    Oct 24, 2015 at 17:59

1 Answer 1


It's possible to use a script, but that's not necessary. Picard has a build-in Convert File Names to Tags for that and for a better recognition, write the tags to your files taken from your filenames.

Open picard and your music folder

     enter image description here

and open Tools - Tags From File Names

     enter image description here

  • Nailed it. Exactly what I was looking for.
    – xyz
    Oct 24, 2015 at 20:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.