• 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: Puzzled by a whose filter
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Puzzled by a whose filter


  • Subject: Re: Puzzled by a whose filter
  • From: Christopher Stone <email@hidden>
  • Date: Sat, 26 Mar 2011 11:25:42 -0500

On Mar 26, 2011, at 10:21, KOENIG Yvan wrote:
I wish to get the list of PDF and pages documents available in a folder.
If I filter on a single extension, it behave flawlessly.
If I try to filter upon a list of extensions it fails.
What am I doing wrongly ?
______________________________________________________________________

Hey Yvan,

I think System Events is just limited in that respect.  It works fine in the Finder on 10.6.7 English.

set f to alias "Thor:Users:chris:Downloads:"
set e to {"mp4", "webarchive"}

tell application "Finder"
try
set fileList to (files of f whose name extension is in e) as alias list
on error errMsg number errNum
set sep to "=============================="
set e to sep & return & "Error: " & errMsg & return & sep & return ¬
& "Error Number: " & errNum & return & sep
# beep
# display dialog e
end try
end tell

--
Best Regards,
Chris
 _______________________________________________
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

References: 
 >Puzzled by a whose filter (From: KOENIG Yvan <email@hidden>)

  • Prev by Date: Puzzled by a whose filter
  • Next by Date: Re: Used to work
  • Previous by thread: Puzzled by a whose filter
  • Next by thread: Re: Puzzled by a whose filter
  • Index(es):
    • Date
    • Thread