Track Name Clean Parts for iTunes

This post was published more than a few years ago (on 2013-04-27) and may contain inaccurate technical information, outmoded thoughts, or cringe takes. Proceed at your own risk.

Download the Script

This script for iTunes finds a Part number at the end of a track title, and then converts it to the user’s preferred format. For example:

  • Full Text:
    The Best of Both Worlds, Part 2
  • Abbreviated Text:
    The Best of Both Worlds, Pt. 2
  • Parenthetical:
    The Best of Both Worlds (2)

Installation

Copy the “Track Name Clean Parts” file into your ~/Library/iTunes/Scripts/ folder (the tilde ~ stands in for the name of your home folder). If the Scripts folder does not yet exist inside the ~/Library/iTunes/ folder, create a new folder there called Scripts.

If that isn’t clear, check out this screen grab:

Finder window ~/Library/iTunes/Scripts/

Operation

“Track Name Clean Parts” searches the track name for a part number, looking for several different possible types of part designation, trying to be as lenient as possible. It will match a pattern only at the end of the title:

Any number of spaces, hyphen or comma (or not), any number spaces, Part or Pt. (or Pat or Prt) (case-insensitive, with period or without), any number of spaces, a number of any length, any number of spaces (in case there are accidental trailing spaces on the name).

When converting to a text format, it will also match a parenthetical format at the end of the title:

Comma (or not), one or more spaces, opening parentheses, a number of any length, closing parentheses, any number of spaces (in case there are accidental trailing spaces on the name).

For example, this will match:

  • The Best of Both Worlds Part 2
  • The Best of Both Worlds, Pt. 2
  • The Best of Both Worlds - part 2
  • The Best of Both Worlds    -      prt2
  • The Best of Both Worlds   (2)

To run the script:

  1. Select the tracks you wish to modify in iTunes.
  2. Select the script from the iTunes script menu. This is the menu item between the “Window” and “Help” menus that looks like a scroll of paper: iTunes script menu (scroll icon)
  3. Chose which format you would like your titles converted to.
  4. The script will run, cleaning up part nomenclature and converting it to your chosen format.
  5. When finished, the script will tell you how many tracks have been cleaned.

Release Notes

1.1

  • 2010-08-24
  • Separated Text and Parenthetical type choices into different dialog boxes to accommodate “Cancel” buttons.

1.0

  • 2010-08-21
  • Initial Release

1 thought on “Track Name Clean Parts for iTunes”

  1. Pingback: iTunes AppleScripts to Clean TV Episode Metadata | Station in the Metro

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.