Put Track Prefix to Track Number v1.5
AppleScript for iTunes

Find more free AppleScripts
and info on writing your own
at Doug's AppleScripts
http://www.dougscripts.com/itunes/

For each selected track whose name begins with a number–of any length–the script will copy the number to the track's track number tag.

This script is Donationware. If you use it and like it, please consider making a donation to support my AppleScripting efforts. Click here for more info.

How to use:

Put this script in your iTunes Scripts folder. This is located in home > Library > iTunes. If there is no folder named "Scripts" there, create one and put the script in it. It will then appear in iTunes' Script Menu, where you can select it by clicking on its name.

Select some tracks (CD track numbers cannot be edited). If any of the selected tracks begin with a number, including zero-prefixed numbers, that number will be copied to the track's track number tag.

The previous version of this script also removed the number from the Song Name. This version of the script cannot accurately determine where the actual track name text begins, so that feature is no longer a part of the script. However, for removing the initial text of selected tracks I recommend using Remove n Characters From Front.

v1.5 sept 21 2004
-- accommodates 1 to 3 digit numbers
-- no longer edits Song Name :(

v1.0 oct 24 '03
-- initial release

this doc last updated September 21 2004

If you have any trouble with this script, please email me.
My name is Doug Adams
dougadams@mac.com

This software is released "as-is". By using it or modifying it you agree that its author cannot be held responsible or liable for any tragedies resulting thereof. AppleScript, iTunes, and iPod are registered trademarks of Apple Computer, Inc.