MACSCRPT Archives

January 2011

MACSCRPT@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Shane Stanley <[log in to unmask]>
Reply To:
Macintosh Scripting Systems <[log in to unmask]>
Date:
Fri, 21 Jan 2011 08:28:42 +1100
Content-Type:
text/plain
Parts/Attachments:
text/plain (22 lines)
On 21/1/11 1:12 AM, "Mark J. Reed" <[log in to unmask]> wrote:

> Well, if you need the extension, you can get it this way:
> 
> name extension of (info for someFile)

Although the dictionary listing for info for says "This command is
deprecated"

> set text item delimiters to "."
> set bareName to text items 1 through -2 of theName as text

Or even:

set text item delimiters to "."
set bareName to text 1 through text item -2 of theName


-- 
Shane Stanley <[log in to unmask]>
'AppleScriptObjC Explored' <www.macosxautomation.com/applescript/apps/>

ATOM RSS1 RSS2