Re: Simple newbie question
Re: Simple newbie question
- Subject: Re: Simple newbie question
- From: Luther Fuller <email@hidden>
- Date: Wed, 17 Jun 2009 15:31:32 -0500
On Jun 17, 2009, at 3:17 PM, Peter Robertson wrote: How can I get just the name of a file without the extension? If I use set theName to (text 1 thru ¬ (offset of "." in theFile) of theFile) with say file '123.jpg' I get '123.' I want just 123 without the "."
set fileAlias to alias "OS_X:Users:lutherfuller:Desktop:0906.1929v1.pdf" tell application "Finder" set extLen to 2 + (length of ((name extension of fileAlias) as text)) (get name of fileAlias) as text set fileName to text 1 thru -extLen of the result end tell
|
_______________________________________________
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