Re: Newbie question - listing items in the trash
Re: Newbie question - listing items in the trash
- Subject: Re: Newbie question - listing items in the trash
- From: Andy Wylie <email@hidden>
- Date: Wed, 20 Mar 2002 07:02:41 +1200
on 20/3/02 4:35 AM, Waters, Nigel at email@hidden wrote:
>
I have written a script in Mac OS 8.6 that used the following commands to
>
list items in the trash folder:
>
>
tell application "Finder"
>
set trash_list to list folder trash
>
end tell
>
>
When I use it in OS 9.2.2, I receive the following error in the event log:
>
>
tell application "Finder"
>
list folder trash
>
--> Finder got an error: Can't make trash into a item.
>
I can't believe that worked Nigel, 'list folder' is Standard Additions OSAX
and requires a path... 'list folder alias "macHD:trash"'
It's not part of Finder's vocabulary and will only confuse it telling it.
Use 'every item of' in a Finder tell...
tell application "Finder"
set trash_list to every item of trash
end tell
_____________________________ Andy
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.