Hello, Here’s my next ugly script. I’m using a TID find and replace routine to delete the file extension from file names I’m collecting to the clipboard, and it works, but I’m wondering if there is a way to simplify it. Is there an AS way to delete the .jpg extension without finding and replacing with “”? Thanks - Mark
set theSel to (selection of application "Finder")
set pathList to {}
repeat with anItem in theSel
set the end of pathList to name of (info for anItem as alias)
end repeat
set {TID, text item delimiters} to {text item delimiters, return}
on replaceText(find, replace, pathList)
set prevTIDs to text item delimiters of AppleScript
set text item delimiters of AppleScript to find
set pathList to text items of pathList
set text item delimiters of AppleScript to replace
set pathList to "" & pathList
set text item delimiters of AppleScript to prevTIDs
set the clipboard to pathList
return pathList
end replaceText
get replaceText(".jpg", "", "" & pathList & "")