Re: Folder or a package ?
Re: Folder or a package ?
- Subject: Re: Folder or a package ?
- From: Paul Berkowitz <email@hidden>
- Date: Sun, 11 May 2003 11:52:03 -0700
On 5/11/03 11:27 AM, "Thomas C." <email@hidden> wrote:
>
s there a way I can make the difference between a folder and a package
>
without using the 'info for' command which is too slow ?
>
>
on open these_items
>
repeat with i from 1 to count of these_items
>
set this_item to item i of these_items
>
if this_item does not end with ":" then
>
it's a file
>
else if this_item ends with ":" then
>
it's a folder or a package ?
>
end if
>
end repeat
>
end
on open these_items
repeat with i from 1 to count of these_items
set this_item to item i of these_items
if (this_item as Unicode text) does not end with ":" then
set itsaFile to true
else
set itsaFile to false
end if
end repeat
end
(If doing this pre-OS 9.1/AS 1.6, use 'as string' rather than 'as Unicode
text', on English/European file paths only).
You can always coerce an alias to its file path by 'as Unicode text' or 'as
string'.
--
Paul Berkowitz
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.