• 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 filename without extension...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting filename without extension...


  • Subject: Re: Getting filename without extension...
  • From: kai <email@hidden>
  • Date: Thu, 5 May 2005 10:50:33 +0100


On Thursday, May 5, 2005, at 05:03 am, Michelle Steiner wrote:

On May 4, 2005, at 6:48 PM, Malcolm Fitzgerald wrote:

StripSuffix("word.doc.pdf")

to StripSuffix(x)
set my text item delimiters to "."
return reverse of (rest of (reverse of (text items of x))) as string
end StripSuffix

That fails if there is no file extension.

to StripSuffix(x)
set text item delimiters to "."
tell (count x's text items) to x's text 1 thru text item (it - 1 mod it)
end StripSuffix


(Whaddya mean - "restore TIDs"?)  ;-)

---
kai

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Re: Getting filename without extension... (From: Michelle Steiner <email@hidden>)

  • Prev by Date: Need Suggestions For appending Date to Filename
  • Next by Date: Frontmost
  • Previous by thread: Re: Getting filename without extension...
  • Next by thread: Re: Getting filename without extension...
  • Index(es):
    • Date
    • Thread