• 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: Files in a Folder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Files in a Folder


  • Subject: Re: Files in a Folder
  • From: Paul Berkowitz <email@hidden>
  • Date: Thu, 09 Aug 2001 18:16:09 -0700

On 8/9/01 5:38 PM, "Timothy Bates" <email@hidden> wrote:

>> On 8/9/01 12:18 PM, Joachim Georgii <email@hidden> wrote:
>>> In fact, I need the labeled files of the folder. Any suggestions??
> tell application "Finder"
> (every file of myFolderAlias whose label index is not 0) as alias list
> end tell
>
> Bearing in mind that there is an AppleScript bug in alias list such that if
> 1 and only 1 item is found, alias list returns an error - duh!
>

Bearing that bug in mind, it's best to do:

tell application "Finder"
try
(every file of myFolderAlias whose label index is not 0) as alias
list
on error
(every file of myFolderAlias whose label index is not 0) as alias
as list
end try
end tell

--
Paul Berkowitz


  • Follow-Ups:
    • Re: Files in a Folder
      • From: John W Baxter <email@hidden>
References: 
 >Re: Files in a Folder (From: Timothy Bates <email@hidden>)

  • Prev by Date: Re: Files in a Folder
  • Next by Date: Scripting Portfolio and Portfolio Server (Extensis)
  • Previous by thread: Re: Files in a Folder
  • Next by thread: Re: Files in a Folder
  • Index(es):
    • Date
    • Thread