Re: Excluding aliases from a file search
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