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:

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:

Select the tracks you wish to modify in iTunes.

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:

Chose which format you would like your titles converted to.

The script will run, cleaning up part nomenclature and converting it to your chosen format.

When finished, the script will tell you how many tracks have been cleaned.