Download hundreds (471 and counting) of AppleScripts for Apple's iTunes that will help make managing your digital music collection easier and more fun!

Popular Now

downloaded 39s ago

Re-Embed Artwork v2.4

Exports and then re-imports selected tracks' artwork

Proper English Title Capitalization

downloaded 2m 47s ago

Proper English Title Capitalization v3.5

Title Cap various track tags, featuring editable exceptions lists

downloaded 8m 21s ago

Stop Track! v2.1

Use special track to stop iTunes, cue next track

Append to Selected Tag

downloaded 31m 46s ago

Append to Selected Tag v4.4

Append user-entered text to beginning or ending of selected tag of each selected track

Drop to Add and Give Info

downloaded 35m 19s ago

Drop to Add and Give Info v3.1

Drag and drop files and enter multi-edit tag info before files are added to iTunes

Make Playlists By Years

downloaded 35m 25s ago

Make Playlists By Years v1.3

Batch-create music playlists by individual year

What's AppleScript?

AppleScript is a simple Macintosh-only programming language that can control and automate actions on your Mac. AppleScript is already available on your computer as part of the Mac OS and many popular applications can be automated using AppleScript scripts. Scripts written for iTunes can manage files and track information, create playlists, interact with other applications, perform innovative tasks, and handle many kinds of chores which otherwise would be repetitive, laborious, and/or time-consuming.

Cool! Where Do I Start?

Start browsing the site by using the scripts ↓ Menu link above. AppleScripts are gathered into these general Categories:

Or use the search box at the top of every page to try and find something specific.

Not sure how to install AppleScripts? Here's a Download/Installation FAQ & Video.

Check back often or follow me on Twitter @dougscripts or on Facebook, or subscribe to my RSS blog feed and 30 Most Recent Scripts RSS feed to stay notified about new and updated scripts and info.


August 10 2017 - 10:23 am

Refresh a Track From Its File’s Metadata

If you make changes to the file of an iTunes track in another application, iTunes doesn’t always immediately update its database with the changes until you’ve played the track or tapped its Get Info window.

This is a relatively old AppleScript command, but refresh is intended to do this. This script will compel iTunes to update the selected track entries in the database with information from the metadata of the their files:

tell application "iTunes"

set sel to selection

if sel is {} then return

repeat with aTrack in sel

if class of aTrack is file track then refresh aTrack

end repeat

end tell

August 10 2017 - 7:21 am

NEW: Show Me The Metadata

Every now and then I’ve needed to inspect the Spotlight metadata for an audio file, usually to find its UTIs or something along those lines. Many years ago I wrote about Spotlight scripting and a one-line mdls script to read this data. But as the years passed, I’d been adding features to this tool as my look-ups became more specific.

Now look what I’ve done.

Show Me The Metadata will display the audio metadata and the Spotlight metadata for either the file of a selected track in iTunes or a user-selected audio file.

The display areas are scrollable. The window and the heights of the display areas are resizable. It also includes additional features to display embedded artwork and activate the Finder’s Information Window for the file. You won’t use this a lot, but it’ll be handy when you need it.

Show Me The Metadata is for macOS 10.10 and later and is free to use with a donation nag. More information and download is on this page.

August 9 2017 - 7:03 pm

Show Information Window for a Track’s File

Occasionally it might be convenient to see the Finder’s Information WIndow for a track’s file. At any rate, it will be more convenient to do so using this script:

tell application "iTunes"

set sel to selection

if length of sel is not 1 then return

set theTrack to item 1 of sel

if class of theTrack is not file track then return

set loc to (get theTrack's location)

if loc is missing value then return

end tell

tell application "Finder"


open information window of loc

end tell

Click the script icon to open this in the Script on your machine. Save it named whatever you like as a “Script” in your ~Library/iTunes/Scripts/ folder so it will appear in iTunes’ Script menu. Select a track (that has a local file), launch the script and the Finder will respond to you.

August 7 2017 - 9:19 am

NEW: Divvy Up A Playlist

I don’t burn CDs much anymore these days. Sad! So when a Correspondent inquired if a script could be written to split up a very long playlist into CD-sized “sub-playlists”, I fuzzily recalled (and Kirk confirmed) that iTunes will ask for additional blank CDs if a single CD is insufficient; such a script would be unnecessary.

But then I thought that there might be other reasons to split up a large playlist into smaller playlists. Say, for example, one wanted to limit the CD contents to only 60 minutes. Or, forget about burning CDs (which, I guess, I have), maybe smaller playlists would be convenient for one’s listening regimen.

So I wrote the script anyway. It was a fun Sunday morning project yesterday.

Divvy Up A Playlist will copy the tracks of a selected user-created playlist in their Play Order to a series of new, smaller playlists each set to a maximum time length and each named with a user-supplied base name and number suffix incremented sequentially. Additionally, the new playlists can all be moved to a new Playlist Folder, like so:

These particular playlists contain local file tracks as well as remote iCloud Music Library tracks, so I couldn’t really burn CDs from them. But whenever I want to listen to my Rolling Stones collection in 74 minute chunks I’m all set (the script can create “sub-playlists” limited in size from 30 to 120 minutes; 74 minutes is the size of a typical CD).

Divvy Up A Playlist is for macOS 10.10 and later and free to use with a donation nag. More information and download is on this page.

[UPDATE; Many thanks to the first downloaders who reported a bug in v1.0. Quickly patched!]

August 5 2017 - 1:03 pm

The Next Track, Episode 64: Album Artwork

Kirk and I talk about album artwork in another one of our iTunes-oriented episodes of The Next Track podcast. Additionally, some useful AppleScripts for managing your iTunes artwork are featured.

This episode is sponsored by Loopback from Rogue Amoeba. Loopback gives you the power of a high-end studio mixing board, right inside your computer. Download a free trial of Loopback and be sure to check out a special offer for The Next Track listeners in this week’s episode.

You can listen to the episode at The Next Track website here or subscribe here in iTunes to make sure you get all future episodes.

July 21 2017 - 1:52 pm

iTunes 12.7 Pulled?

When Apple released macOS High Sierra 10.13 beta 3 to developers on July 10 a download for iTunes 12.7 (build was also made available. By July 17, when I installed the Beta for the first time on another machine, iTunes 12.7 was no longer available for download.

There were reports on the Developer Forum about devices not being recognized so perhaps this is part of the reason for pulling it.

July 19 2017 - 1:49 pm

iTunes 12.6.2 Released

Apple has released iTunes version 12.6.2 (build today along with macOS Sierra 10.12.6. Not much specific on changes in iTunes other than the usual performance enhancements.

July 17 2017 - 7:04 pm

Somewhat Annual Reminder About Beta Operating Systems

Its been a few weeks now that the betas of Apple’s newest operating system, High Sierra/macOS 10.13, have been in the wild. And as I’ve been warning every Summer for a few years now: Unless the documentation or description of an application or script from this site specifically states that it is compatible with High Sierra, it most likely isn’t.

That doesn’t mean that apps and scripts won’t work at all. It just means to watch out because they might not work as expected.

And if you’re part of the Beta program and you run into an issue with an app or script you use regularly, please be sure to let me know.

July 15 2017 - 1:03 pm

NEW: Coverscope

So I guess artwork in iTunes drives some people crazy.

I have to admit I really don’t give a poop about artwork most of the time. But I get that many people do. One thing that many of my OCD-About-Artwork friends insist upon is that a track’s album artwork also be contained in that track’s file’s metadata; that the correct artwork is “embedded”.

Coverscope is an applet that will show both the assigned iTunes track artwork and the local file’s metadata artwork (if any exists) for the selected track.

Scrolling through tracks may turn up something like this, where the track entry in iTunes has artwork but its associated file does not have image data in its metadata:

Here’s a track where both the iTunes artwork exists and its file’s metadata contains image data:

There are features to Embed the track artwork to the file’s metadata, Apply the metadata image data to the track, drag an image file to Apply and Embed, Copy Track Artwork to Clipboard and Save Track Artwork as File.

Coverscope is free to use in Demo Mode, during which the above features can be used in any combination up to five times per launch. An in-app purchase of a registration code for $1.99 will remove the restriction so it can be used smoothly without re-launching.

More information and download is available on this page.

July 1 2017 - 3:01 pm

NEW: Find Empty iTunes Media Folders

A tweet is worth…well, I guess only 140 characters. But a picture of a tweet should be worth more, right?

Anyway, this tweet from a Correspondent reminded me about something I’ve been aiming to do for a while and that’s find the folders in the iTunes Media folder that 1) are empty and that iTunes wouldn’t or couldn’t delete and 2) find the folders that are virtually empty except for any files that aren’t compatible with iTunes.

Typically, if you allow iTunes to manage the iTunes Media folder, iTunes will remove “Artist” and “Album” folders when it happens that they become empty by virtue of deleting tracks and their files in the app. But, if you manage the iTunes Media folder yourself (or some other folder/s that store your media files) and delete tracks and files, I’m not so sure iTunes will delete the empties. Or, if, like the author of the tweet, you’ve placed files alongside your media that iTunes doesn’t recognize—set lists or liner notes as text files, album art as “folder.jpg” or “cover.jpg” files, and so on—then iTunes won’t delete these folders either. My guess is that if you’ve Trashed the media files, you probably don’t need the associated bric-a-brac anymore and these folders could be disposed of.

Short of going through the entire iTunes Media folder using your fingers and eyeballs, Find Empty iTunes Media Folders will quickly traverse the iTunes Media folder looking for empty folders and folders that only contain files that iTunes doesn’t recognize.

I wish I had taken a screenshot of the folders it found before I really started testing the delete feature. I originally had about thirty folders either empty or containing potential jetsam.

Find Empty iTunes Media Folders can be downloaded and used in Demo Mode for free. In Demo Mode, several features will be disabled, which include:

  • Show Finder Information Window
  • Reveal in Finder
  • Send to Trash
  • Select all Empty/non-Empty
  • Only Scan for Empty Folders
  • Scan other user-selected folder

If you like and use the app, you can purchase a registration code for $1.99 that will remove the Demo Mode restrictions and enable the features listed above. You can get more information and download it from this page.

Site contents © 2001 - 2017 (that's right: 2001) Doug Adams and weblished by Doug Adams. Contact support AT dougscripts DOT com. About.
All rights reserved. Legal.
AppleScript, iTunes, iPod, iPad, and iPhone are registered trademarks of Apple Inc. This site has no direct affiliation with Apple, Inc.
One who says "it cannot be done" should not interrupt one doing it.