• 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: Simple newbie question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >Simple newbie question (From: Peter Robertson <email@hidden>)

  • Prev by Date: Simple newbie question
  • Next by Date: Re: Plan E from Outer Space
  • Previous by thread: Simple newbie question
  • Next by thread: Re: Simple newbie question
  • Index(es):
    • Date
    • Thread