• 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: Newbie question - listing items in the trash
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: Newbie question - listing items in the trash - Thanks, it worked!
      • From: "Waters, Nigel" <email@hidden>
References: 
 >Newbie question - listing items in the trash (From: "Waters, Nigel" <email@hidden>)

  • Prev by Date: AppleScript Communication
  • Next by Date: Re: scripting 'mail' from OS X
  • Previous by thread: Re: Newbie question - listing items in the trash
  • Next by thread: Re: Newbie question - listing items in the trash - Thanks, it worked!
  • Index(es):
    • Date
    • Thread