Re: Get List of Certain Desktop Filetypes
Re: Get List of Certain Desktop Filetypes
- Subject: Re: Get List of Certain Desktop Filetypes
- From: Nigel Garvey <email@hidden>
- Date: Thu, 6 Dec 2001 00:47:52 +0000
Gnarlodious wrote on Wed, 05 Dec 2001 08:17:04 -0700:
>
I am trying to get a list of specified filetypes on my Desktop:
>
(Akua)
>
tell application "Finder"
>
set x to items in desktop whose file type is in ({"M822", "TEXT"} as alias)
>
repeat with i in x
>
open alias i
>
>
ETC.
>
>
What is the best/right way to do this? Because I get error "Can't make
>
{"M822", "TEXT"} into a alias"
tell application "Finder"
try
set x to (items in desktop whose file type is in {"M822", "TEXT"})
as alias list
on error -- the Finder can't return an alias list if there's only one
item
set x to (items in desktop whose file type is in {"M822", "TEXT"})
as alias as list
end try
repeat with i in x
open i
end repeat
end tell
NG