Hello all,
I’ve got a droplet that works on one item at a time. I’d like it to work on multiple items i.e. I’d like to drop as many items as I want onto the droplet, and have it replace the name of all of them. How can I make it work?
TIA
Walt
on open aFile
set searchStrings to {"Aunt", "Uncle", "Grandmother"}
set replaceStrings to {"Pam", "Bill", "Jeanette"}
tell application "Finder"
set aFile to aFile as alias
set fileName to name of aFile as string
repeat with i from 1 to count of searchStrings
set AppleScript's text item delimiters to item i of searchStrings
set newName to every text item of fileName
set AppleScript's text item delimiters to item i of replaceStrings
set fileName to newName as string
set name of aFile to fileName
end repeat
end tell
end open