On 04/10/15 11:38 AM, "Josh Wisenbaker" <email@hidden> wrote:
> Plus it didn't check to see if it had an extension already... This one
> does
>
> "on open (theList)
> set itemCount to number of items in theList
> tell application "Finder"
> repeat with theItem in theList
> set currentName to the name of theItem
> set hasExtension to (character -4 of currentName as text)
> if hasExtension is "." then
Wouldn't it be better (in case the file has .s in the name or has a short
name to use the name extension property of the item?
on open (theList)
set itemCount to number of items in theList
tell application "Finder"
repeat with theItem in theList
set {fType, fExt} to {type, name extension} of theItem
if fExt is not "" then -- etc.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macos-x-server mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/macos-x-server/email@hidden
This email sent to email@hidden