Skip to content

Instantly share code, notes, and snippets.

@erikformella
Created June 20, 2012 23:43
Show Gist options
  • Save erikformella/2962949 to your computer and use it in GitHub Desktop.
Save erikformella/2962949 to your computer and use it in GitHub Desktop.
Tryna fix some trax in iTunes
tell application "iTunes"
repeat with t in selection
set da_name to (name of t)
set x to (offset of "." in da_name) + 2
set y to (length of da_name)
set numbah to (text 1 thru ((offset of "." in da_name) - 1) of da_name)
set da_new_name to (text x thru y of da_name)
set name of t to da_new_name
set track number of t to numbah
end repeat
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment