• 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: Getting file suffix
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Getting file suffix


  • Subject: Re: Getting file suffix
  • From: Luther Fuller <email@hidden>
  • Date: Mon, 13 Sep 2010 07:57:22 -0500

On Sep 13, 2010, at 6:38 AM, André Renault wrote:

You should ask the Finder for the file suffix.

tell app "Finder" to get the name extension of thisFile

There is a difference between a file suffix and the name extension.
This script illustrates the difference ...

set folderAlias1 to alias "OS_X:Users:lutherfuller:Desktop:untitled.framework"
set folderAlias2 to alias "OS_X:Users:lutherfuller:Desktop:untitled.i06dako3tv99"
tell application "Finder"
name extension of folderAlias2
log the result --> ""
name extension of folderAlias1
log the result --> "framework"
end tell

"i06dako3tv99" is a file suffix, but not an extension.

This may be a bug, but that's the way it works.


 _______________________________________________
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: 
 >Getting file suffix (From: LuKreme <email@hidden>)
 >Re: Getting file suffix (From: AndrĂ© Renault <email@hidden>)

  • Prev by Date: Re: Getting file suffix
  • Next by Date: Re: Getting file suffix
  • Previous by thread: Re: Getting file suffix
  • Next by thread: Re: Getting file suffix
  • Index(es):
    • Date
    • Thread