• 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: Folder or a package ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Folder or a package ? (From: "Thomas C." <email@hidden>)

  • Prev by Date: Creating PDF files from a browser
  • Next by Date: Re: Folder or a package ?
  • Previous by thread: Folder or a package ?
  • Next by thread: Re: Folder or a package ?
  • Index(es):
    • Date
    • Thread