Re: Dumb Finder scripting question
Re: Dumb Finder scripting question
- Subject: Re: Dumb Finder scripting question
- From: Paul Berkowitz <email@hidden>
- Date: Fri, 14 Dec 2007 14:26:59 -0800
- Thread-topic: Dumb Finder scripting question
Right. I've wondered why there's no "root name" or something similar,
myself.
And
>> set thesourcename to (name of (info for the_item))
>> set thesourcename to (text items 1 thru -5 of thesourcename) as Unicode text
will be wrong in the case of extensions that are longer than 3 characters
(there are some ".jpeg" files around, among others. Not to mention one of
our favorites here - ".scpt").
Best to get both the name and name extension in the Finder, count the
extension, and use text 1 to (that -2), if that is not 0, of the name. I
know you know that, but maybe not everyone has thought of it.
--
Paul Berkowitz
> From: "Mark J. Reed" <email@hidden>
> Date: Fri, 14 Dec 2007 17:08:17 -0500
> To: Laine Lee <email@hidden>, Applescript Users
> <email@hidden>
> Subject: Re: Dumb Finder scripting question
>
> Thanks for the help. I was mainly asking if there were a way to do it
> without string munging, based on the fact that Finder items have a
> "name extension" property, but since there's no "name without
> extension" property, I guess not.
>
>
>
> On 12/14/07, Laine Lee <email@hidden> wrote:
>> set thesourcename to (name of (info for the_item))
>> set thesourcename to (text items 1 thru -5 of thesourcename) as Unicode text
_______________________________________________
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