Re: Replace first 3 characters of a song
Re: Replace first 3 characters of a song
- Subject: Re: Replace first 3 characters of a song
- From: Thomas Fischer <email@hidden>
- Date: Mon, 14 Nov 2011 08:43:12 +0100
Hello Paul,
I use the script below to change properties of songs in iTunes. It uses the (free) satimage.osax for the "change" command (with regexp), but for simple replacements you can do without that. The "tell me" suppresses an error, it sends the command directly to AppleScript instead of iTunes first.
Something like
tell me to set theName to change "^\d+" into "" in theName with regexp
should work for you.
You should put the script into iTunes' script folder, select the offending track and call the script from the script menu.
All the best
Thomas
tell application "iTunes"
set this_List to the selection of front window
repeat with i from 1 to the number of items in this_List
set theName to the name of item i of this_List
#tell me
# set theNumber to change "0?(\\d+) - .*" into "\\1" in theName with regexp
# tell me to set theName to change "^.* - " into "" in theName with regexp
#end tell
#tell me to set theName to change "^'" into "" in theName with regexp
# set theName to "A" & theName
#set the name of item i of this_List to theName
set the compilation of item i of this_List to false
# set the track number of item i of this_List to theNumber
end repeat
end tell
Am 14.11.2011 um 06:53 schrieb Paul Moortgat:
> When I download music from the iTunes store these songs have usually a number of 3 digits in front.
> I like to replace these numbers with the name of the artist. I do it now manually.
> Does a file for this exist?
>
> Paul Moortgat _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> AppleScript-Users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> Archives: http://lists.apple.com/archives/applescript-users
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden