August 20 '16 - 6:15 am
Copy Grouping to Work

As you probably know, the latest beta version of iTunes 12.5 includes Work and Movement track tags which Classical music listeners will appreciate. In many cases, you might want to use the text in the Grouping tag for the Work tag. While it might seem easy to just do a Multi-Edit on the tracks and copy-and-paste using the Get Info fields, you’d only be able to do this for individual batches of a single work at a time.

Here’s an AppleScript that will simply copy the Grouping tag to the Work tag for any number of selected tracks:

tell application “iTunes”

set sel to selection of front browser window

if sel is {} then return

repeat with aTrack in sel


tell aTrack to set work to (get grouping)

end try

end repeat

end tell

Save this named whatever you like to your [home]/Library/iTunes/Scripts/ folder so that it will appear in the iTunes Script menu. Select some tracks and launch the script by selecting it from the Script menu. The text from the Grouping tag, even if it’s blank, will be copied to the Work tag of each selected track.

UPDATE: This script can be downloaded as part of the Work and Movement Scripts.

August 16 '16 - 8:48 am
NEW: Loved Playlists v1.0

The only time you can see if a Playlist has been Loved is to view it in Playlist View, whereby a heart icon will appear in the upper right corner of the browser window. So here’s an applet, Loved Playlists, that will list all the “loveable” playlists (plain, Smart and Folder) and display the appropriate icon (it will also accommodate the Dislike feature available in iTunes 12.5, currently in beta.):

As you probably have noticed, there is also an option to batch-edit these settings for one or more selected playlists.

Loved Playlists is free to download, with a donation requested. It is for OS X 10.10 (Yosemite) and later only.

August 15 '16 - 12:02 pm
Hassle-Free Playlist Description

One of the neat things that Apple added to iTunes not so long ago is the user-editable description that is available for regular Playlists (Smart, Folder, Genius and Master library playlists do not have this option) and is visible when the Playlist is in Playlist View. You can edit this description by clicking the Playlist’s “Edit Playlist” button. But when you do this, the iTunes interface changes: a column appears at the right edge of iTunes listing the current tracks in the playlist to which you can drag tracks. It also will change the (now center column) browser window to display the full Music library, which totally discombobulates me.

I do not always care for this when I just want to edit the Playlist’s description. I’d prefer to do so without shaking up the interface. This script will do it:

tell application “iTunes”


set thisPlaylist to (get view of front browser window)

tell thisPlaylist

if special kind is not none or smart or genius or shared then error

end tell

on error



end try

set defaultAnswer to (get thisPlaylist’s description)

if defaultAnswer is missing value then set defaultAnswer to “”

set newDescription to text returned of ¬

(display dialog “Enter the description text for the playlist” & return ¬

& thisPlaylist’s name default answer defaultAnswer)


set thisPlaylist’s description to newDescription

end try

end tell

Save this named whatever you like to your [home]/Library/iTunes/Scripts/ folder so that it will appear in the iTunes Script menu. Select a playlist and launch the script by selecting it from the Script menu. It will quit if the selected playlist is the wrong kind. It will display the current description for the playlist if it exists, otherwise the text field will be blank. Enter up to 255 characters, which is the most that the description can accept, and then click “OK”.

Give this a keyboard shortcut to maximize your quality of life.

August 12 '16 - 5:50 pm
A Couple of Work and Movement Scripts

In case you hadn’t heard, the latest beta of iTunes 12.5 (available to Developers and Sierra Public Beta participants) has added Work, Movement Name, and Movement Number/Count tags for music tracks (well, all tracks have these tags, but iTunes’ contextual UI may keep them from showing up in contexts other than Music.). When the Work and Movement tags of a track are used, iTunes constructs a new display Song Name for the track using the Work, Movement Number and Movement Name tags. iTunes even converts the Movement Numbers into Roman numerals for the aggregated name. The original Song Name is still available, it just mostly isn’t visible. (Kirk and I talk a little about these changes in Episode #13 of The Next Track podcast.)

You may want to edit your track tags to take advantage of these new Work and Movement tags. What I found was that most of what I wanted to use in those tags was already in the Song Name (eg: “Brandenburg Concerto No. 1 in F, BWV 1046: I. Allegro”), but the Get Info panel won’t display the Song Name field together with the Work and Movement fields in order to copy some text from the former to one of the latter. I want to be able to copy “Brandenburg Concerto No. 1 in F, BWV 1046” to the Work tag and “Allegro” to the Movement tag. But the Song Name isn’t visible.

So I wrote a script that grabs the text of the Song Name and displays it in a text field; the text can be edited however required and when the “OK” button is clicked, that text will be copied to the Movement Name.

(I’d be deleting the highlighted text.) This has to be done one track at a time; there’s really no easy way to automate the selection of text since conventions vary about that sort of thing. So, you have to do some of the work. A keyboard shortcut really helps here.

A second script works similarly for the Work Name tag, except you can choose more than one track at a time (the first selected track’s Song Name is used) to which to apply the edited text. It will also increment each selected track’s Movement Number/Count starting with 1 based on the tracks’ Play Order.

In this case, I’d have selected the four tracks comprising the movements of this Work, deleted the highlighted text, and then pressed OK. Make sure the selected tracks are sorted by Play Order (this should be done in Songs or Playlist View, ideally) so that the Movement Number increments for each track correctly.

Just to be clear, the original Song Name remains as is. It’s just that, when the Work and Movement tags are used, you’ll rarely see it. In most contexts, you’ll only ever see the aggregated Work-Movement Number-Movement name.

Here are the scripts:


August 12 '16 - 6:46 am
The Next Track Podcast, Episode #13

Kirk and I welcome back Chris Connaker to discuss music streaming services. Apple Music, Spotify, Tidal, or another; which is right for you? What are the pros and cons of the various streaming services?

Listen to The Next Track: Episode #13 ? Which Streaming Service Is Right for You?

Find out more, and subscribe to the podcast, at The Next Track website. You can follow The Next Track on Twitter at @NextTrackCast, to keep up to date with new episodes, and new articles from the website.

August 7 '16 - 2:54 pm
Dislike is a New iTunes 12.5 Track Property

If you have access to the latest macOS 10.12 Developer Preview then you probably downloaded the newest iTunes 12.5 beta ( It has a new “Dislike” track feature and corresponding AppleScript disliked track and playlist property and album disliked track property. These work like the corresponding loved properties.


In the current iTunes beta there is no way to know which tracks you’ve Dislike’d; there’s no column in the browser window, there’s no widget in the Get Info window, and there’s no “Disliked” criteria for Smart Playlist making—yet, I guess, right?

But for now there is this:

— iTunes or later required

tell application “iTunes”

set dislikedTracks to {}


set dislikedTracks to every track of library playlist 1 whose disliked is true

end try

if dislikedTracks is {} then return

if (exists playlist “_Disliked_”) then

delete playlist “_Disliked_”

end if

set thePlaylist to (make new playlist with properties ¬

{name:”_Disliked_”, description:(“Disliked tracks as of ” & my makeDateString()) as text})

repeat with dislikedTrack in dislikedTracks


duplicate dislikedTrack to thePlaylist

end try

end repeat

reveal thePlaylist

end tell

to makeDateString()

set cd to (get current date)

return (short date string of cd & space & time string of cd) as text

end makeDateString

It just copies every disliked track to a new playlist named “_Disliked_”, re-creating the playlist each time the script is run. It’ll also time stamp the playlist’s description.

This script won’t work unless you have the latest iTunes 12.5 beta with the disliked track property, which I suspect may be in the next Public Beta release.

August 5 '16 - 6:38 am
The Next Track, Episode 12

In Episode 12 of The Next Track podcast, Kirk and I talk about iTunes and AppleScript. During the episode, we mentioned the following scripts:

Artist – Name Corrector
Remove n Characters from Front or Back
This Tag, That Tag
Search Replace Tag Text
Proper English Title Capitalization
List MIAs
Super Remove Dead Tracks
Music Folder Files Not Added
Move Playlists to Folder
Playlist Manager
Find Album Artwork With Google
Save Album Art as folder.jpg
Embed Artwork
Re-Embed Artwork
PDF Adder
View Cached Music
Copy Tag Info Tracks to Tracks
A Space Between

In case you don’t know, The Next Track is a weekly 30-minute podcast in which Kirk McElhearn and I discuss how people listen to music today; it was inevitable we’d talk about iTunes and AppleScript at some point, right?

August 1 '16 - 7:24 pm
Revisiting Reset Plays

The iTunes faithful may remember that iTunes 12.4 removed the “Reset Plays” option. This command would zero the Plays and Skips of a track.

AppleScript to the rescue: I posted a script, Reset Plays, that replicated this feature and additionally deleted the Last Played Date and Last Skipped Date, turned off “Remember Playback Position”, and set the played property to false; essentially, rendering a track as “never played”.

Whether due to user clamor or by design, the “Reset Plays” feature was restored in iTunes 12.4.1 and I figured the script was obsolete.

Today, I got around to trying iTunes’ native “Reset Plays” in v12.4.3 (it is not something I would normally use at all). While the Plays and Skips are set to zero as expected, surprisingly, the Last Played Date and Last Skipped Date remain; such that a Smart Playlist filtering by the date a track was last played (or skipped) will not realise that these “reset” tracks were supposed to appear as never played.

So, Reset Plays may actually still be useful.

August 1 '16 - 3:56 pm
iTunes 12.4.3 Released

Apple has released an update to iTunes. Version 12.4.3 “resolves an issue where playlist changes made on other devices may not appear in iTunes.” I’m wondering if this addresses the played count problem. More as it develops.

July 18 '16 - 6:15 pm
iTunes 12.4.2 Released

Apple released iTunes 12.4.2 today (along with updates to all current OS) which addresses a play back issue with short songs in Up Next. More if it develops.

Site contents © 2001 - 2016 (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.