iTunes: populating a play list based on text file contents

Greetings!


I have a comma-separated-value (CSV) text file with the following headers:

Artist Song_Name

How do I feed the text file to iTunes to populate a new playlist in batch (withouth adding each sond manualy one by one)?

Thank you.

iPhone 16 Pro Max, iOS 18

Posted on Jun 9, 2025 11:18 AM

Reply
5 replies

Jun 9, 2025 12:18 PM in response to Andrey_Kazak

Hi,


There isn't a process to do that automatically. iTunes can read playlists in a couple of different formats, but they all have to include the full path to each track in question. I presume the songs already exist in the library? If so I could potentially write a script that would analyse the library make a list of all <Artist> <Song Name> pairs, then read in your CSV file and if it finds a match add the corresponding track to a playlist. How big is your list? Is this a job you need to do more than once? It might be just as easy to export location information from the library, along with the artist and song name values, hack the data in Excel or similar, and produce an importable playlist that way.


You can find some of my existing scripts at https://samsoft.org.uk/itunes/scripts.asp.


tt2

Jun 10, 2025 03:40 AM in response to Andrey_Kazak

I write in VBScript, but you can also use C#, JScript, Perl, and presumably anything else that can access a Windows COM interface. You can find some archived documentation here: https://web.archive.org/web/20220813205345/http://www.joshkunz.com/iTunesControl/interfaceIiTunes.html.


There is nothing in the model that supports programmatic access to the Apple Music collection, it is strictly for managing local data. As far as I can tell you will have to look everything up manually. 😕


tt2

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

iTunes: populating a play list based on text file contents

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