tell
application
"Finder"
set
selectionList
to
the
selection
as
alias list
if
(count
items
of
selectionList)
≠
1
then
beep
return
end
if
set
selectedItem
to
(item
1
of
selectionList)
if
(class
of
item
selectedItem)
is
alias file
then
set
selectedItem
to
(original item
of
selectedItem)
as
alias
end
if
if
(class
of
item
selectedItem)
is
not
folder
then
beep
return
end
if
--
-- selectedItem is now an alias to
a folder
-- do stuff with it here
end
tell
Notice
that this script allows you to select a single item which must be a
folder or an alias file to a folder.