Auto batch-insert track numbers in iTunes

itunes

I recently imported a whole bunch of MP3s that I've already grouped into a single album, but the ID3 tags for track numbers are all blank. How can I tell iTunes to auto-add track numbers in the order they just happen to be in in iTunes? The actual order of the MP3s isn't essential, but I like to keep every MP3 in my library properly labelled.

Best Answer

iTunes doesn't offer this functionality natively: Doug's AppleScripts for iTunes always comes in handy in these situations. In this case, however, there's no easy solution, because there is no script that does that. You would need a combination of three scripts, which should work and should be fairly easy as soon as you have installed all three of them:

  1. Get Number Song Names by Play Order and run it on the tracks you would like to number. This will add track numbers to the beginning of the track name.
  2. Run Put Track Prefix to Track Numbers on the tracks, which will set the track tags based on the number you've added in step 1.
  3. Use Remove n Characters From Front or Back to remove the track numbers added to the name.

As far as I can tell this is the easiest way to accomplish that. Of course you could also write your own AppleScript which does it in one step. And don't forget to create a backup, just in case.