Re: Getting file suffix
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