Re: asc ascii file extensions
Re: asc ascii file extensions
- Subject: Re: asc ascii file extensions
- From: "Mark J. Reed" <email@hidden>
- Date: Fri, 25 Mar 2011 13:06:33 -0400
There have been threads on extracting file extensions before, but the
gist is that Finder only recognizes a certain set of file extensions.
You're better off using System Events instead. (Or doing direct
string manipulation on the filename, e.g. with text item delimiters).
On Fri, Mar 25, 2011 at 12:16 PM, James Roberts <email@hidden> wrote:
> I did a quick search of the list and didn’t find anything related to this.
> If I missed something I apologize and please send me a link to the thread.
> I have a couple of scripts that manipulate files base on there extensions. I
> noticed that a couple of files failed to process every time.
> What I found confuses me.
> tell application "Finder"
> get name extension of document file "test.txt" of folder "tmp" of home
> --> "txt"
> end tell
>
> Result:
>
> "txt"
>
> tell application "Finder"
> get name extension of document file "test.asc" of folder "tmp" of home
> --> ""
> end tell
>
> Result:
>
> ""
> tell application "Finder"
> get name extension of document file "test.ascii" of folder "tmp" of home
> --> ""
> end tell
>
> Result:
>
> ""
> Is this a known problem or am I missing something (most likely:-)? This
> happens on both 10.6.7 and 10.5.8
>
> exjimmy
>
> _______________________________________________
> 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
>
--
Mark J. Reed <email@hidden>
_______________________________________________
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