Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Batch Add Comments Tag Solution?

I am looking for a solution where I batch add metadata to my songs (over 18,000) into the comments field. Specifically, I have a database of my exported library in excel of the Billboard hits information and the song's peak chart position. I would like to add that specific information to each individual song in the comments field (or any field that it could fit in for that matter), so I can use it for building smart playlists.


I am not sure if there is a third party program that can be used to append this information or if I am going to have to build the script to do that. Thanks for your answers in advance!

Posted on Mar 28, 2015 9:20 AM

Reply
5 replies

Mar 28, 2015 9:38 AM in response to Coop197823

I have a couple of scripts that might serve as a starting point. See ExportCSV and ExportImport. Ideally you want to get each track's LibraryPersistentID associated with the comment that you want to attach to it. (iTunes scripts cannot access tracks directly by file path.) You could then write something to import that data saved as a CSV file, or constuct a table that matches the output of the ExportImport script and save that as a text file to import.


What data do you have in the spreadsheet already?


tt2

Mar 28, 2015 10:18 AM in response to turingtest2

I have a full exported playlist (about 12,000 songs in a csv format. I have matched up that unedited database to a new field which has the billboard text in it. I cannot remember off the top of my head if that exported playlist has that unique LibraryPersistentID. Is there a way to export that out easily and still be able to match up the work I have already done from that other playlist file I created?


Coop

Mar 28, 2015 11:48 AM in response to Coop197823

iTunes doesn't export LibraryPersistentID. I've just updated myExportCSVscript so that it also includes location, so you could use a lookup function to gather up the IDs into your existing table of data.


Once that is done you could create a new sheet that constucts rows of data of the form:


<ID>32F346B7-BF018101

<Comment>A Comment

<ID>B19F4321-CC716CE2

<Comment>A Comment


Then export that as a text file to import using the ExportImport script which I have also just updated so that it can import the Comments field.


I have often have multiline comments so I have implemented " \n " (without the quotes) as a placeholder for any new line characters in the exported data, so that they don't break up the one line per field format, and can be restored on import. The value used is a variable so could be adjusted easily.


tt2

Batch Add Comments Tag Solution?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.