Re: remove suffix
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]