• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Getting file suffix
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting file suffix


  • Subject: Re: Getting file suffix
  • From: Shane Stanley <email@hidden>
  • Date: Tue, 14 Sep 2010 08:22:12 +1000
  • Thread-topic: Getting file suffix

On 14/9/10 8:04 AM, "Steve Thompson" <email@hidden> wrote:

> This is how I do it:
>
> if (this_item as string) contains "." then set the_extension to (characters
> ((offset of "." in (this_item as string)) + 1) thru -1 of (this_item as
> string)) as string

That fails if the name includes more than one period. It also uses a
coercion of a list to text, meaning it's prone to problems with changed text
item delimiters.

--
Shane Stanley <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

References: 
 >Re: Getting file suffix (From: Steve Thompson <email@hidden>)

  • Prev by Date: Re: Getting file suffix
  • Next by Date: Applescript: force garbage collection? (NSAppleScript call from Cocoa app)
  • Previous by thread: Re: Getting file suffix
  • Next by thread: Re: Getting file suffix
  • Index(es):
    • Date
    • Thread