• 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: Excluding aliases from a file search
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Excluding aliases from a file search


  • Subject: Re: Excluding aliases from a file search
  • From: kai <email@hidden>
  • Date: Tue, 18 Jul 2006 11:11:34 +0100


On 18 Jul 2006, at 10:30, Yvan KOENIG wrote:

As some documents may be of "illegal" type, this extended script may do the trick.

--[SCRIPT]
tell application "Finder"
set ImgFiles to (document files of entire contents of ImgsFldr)
set Img_Files to {}
repeat with f in ImgFiles
set fa to f as alias
if (name extension of fa is in {"eps", "tif", "jpg"}) or file type of fa is in {"EPSF", "TIFF", "EPSP", "JPEG"} then copy fa to end of Img_Files
(* a single line *)
end repeat
end tell

Yes, if further filtering was required, something like that might help, Yvan - as might (one line):


----------------
tell application "Finder" to set ImgFiles to document files of entire contents of ImgsFldr whose name extension is in {"eps", "tif", "jpg", "gif"} or file type is in {"EPSF", "TIFF", "EPSP", "JPEG", "GIFf"} (* or whatever *)
----------------


However, since Coj may ultimately be looking for such "illegal" files, turning that on its head might even suit his purposes better (again, one line):

----------------
tell application "Finder" to set NonImgFiles to document files of entire contents of ImgsFldr whose name extension is not in {"eps", "tif", "jpg", "gif"} and file type is not in {"EPSF", "TIFF", "EPSP", "JPEG", "GIFf"} (* or whatever *)
----------------


If none of the variations give him the kind of thing he's after, no doubt he'll be back to put us straight. ;-)

---
kai


_______________________________________________ Do not post admin requests to the list. They will be ignored. Applescript-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Excluding aliases from a file search (From: Brett Conlon <email@hidden>)
 >Re: Excluding aliases from a file search (From: kai <email@hidden>)
 >Re: Excluding aliases from a file search (From: Yvan KOENIG <email@hidden>)

  • Prev by Date: bounds of Finder Windows
  • Next by Date: getting the image file of a mounted disk image
  • Previous by thread: Re: Excluding aliases from a file search
  • Next by thread: bounds of Finder Windows
  • Index(es):
    • Date
    • Thread