• 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: Is Image Disk Trash Empty?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is Image Disk Trash Empty?


  • Subject: Re: Is Image Disk Trash Empty?
  • From: Luther Fuller <email@hidden>
  • Date: Tue, 25 Jan 2011 11:52:19 -0600

I didn't quit experimenting, and this handler seems to work ...

on TrashIsEmpty(diskAlias)
quoted form of (POSIX path of ((diskAlias as text) & ".Trashes:"))
set sizeText to do shell script "ls -Rsk " & the result
set AppleScript's text item delimiters to {"total"}
set sizeList to (text items of sizeText)
set AppleScript's text item delimiters to {return}
repeat with i from 2 to (count items of sizeList)
try
(text item 1 of (item i of sizeList)) as integer
if the result > 0 then return false
end try
end repeat
return true
end TrashIsEmpty ------------------------------------------

But, will this report trash size for all users? And, should I care?

This seems like something that Finder or System Events should be able to do. But, can they?

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Is Image Disk Trash Empty?
      • From: Luther Fuller <email@hidden>
References: 
 >Is Image Disk Trash Empty? (From: Luther Fuller <email@hidden>)

  • Prev by Date: 'my' problem is your problem: it chokes without 'my'! BUG
  • Next by Date: Re: Is Image Disk Trash Empty?
  • Previous by thread: Is Image Disk Trash Empty?
  • Next by thread: Re: Is Image Disk Trash Empty?
  • Index(es):
    • Date
    • Thread