• 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: remove suffix
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: remove suffix


  • Subject: Re: remove suffix
  • From: "Marc K. Myers" <email@hidden>
  • Date: Fri, 28 Sep 2001 14:15:28 -0400
  • Organization: [very little]

> Subject: RE: remove suffix
> Date: Fri, 28 Sep 2001 12:22:35 +0100
> From: Nigel Garvey <email@hidden>
> To: "AppleScript Users" <email@hidden>
>
> Marc has suggested:
>
> > set aString to (text items 1 thru -2 of aString) as text
>

[Snip!]

> All of the suggestions so far assume that the file name actually *has* a
> suffix, but in the context of the original enquiry, that's probably OK.
> However, how about this?

Actually, my suggestion takes that into account by putting the line you
mentioned in a try block. If there is no "." in the string that command
fails and aString remains as it was.

Marc K. Myers <email@hidden>
http://AppleScriptsToGo.com
4020 W.220th St.
Fairview Park, OH 44126
(440) 331-1074

[9/28/01 2:14:19 PM]


  • Prev by Date: Re: Changing screen resolution
  • Next by Date: Re: How to tell if a file is busy?
  • Previous by thread: RE: remove suffix
  • Next by thread: Check status of a menu item
  • Index(es):
    • Date
    • Thread