• 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: Looking for empty folders
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Looking for empty folders


  • Subject: Re: Looking for empty folders
  • From: "email@hidden" <email@hidden>
  • Date: Fri, 6 Mar 2009 08:07:54 -0800

this works:
tell application "Finder" to set emptyFolders to folders of myfolder whose (size) is 0
HTH



ES On Mar 6, 2009, at 6:51 AM, Mark J. Reed wrote:

Hm.  I tried this:

tell application "Finder"
get all folders of folder "blah" whose items is empty
end tell

But it timed out.

whose items's length is 0

gave me an unknown object error; it seems to be applying the condition
to every item in the list instead of the item list itself.

But this should work:

property result: {}
tell application "Finder"
   repeat with f in (get folders of folder "path:to:some:folder")
      if length of (get items of f) = 0 then
        set end of result to f as alias
      end if
   end repeat
end tell
result

On Fri, Mar 6, 2009 at 9:18 AM, Ronald Hofmann <email@hidden> wrote:
Hi all,
I tryin to find all empty folders inside myMainFolder.
This what I tried:

tell application "Finder"
get empty folders in folder "MacOSX:Users:ronny:Desktop:Icons:"
end tell


Which doesn´t work. Any clues?

Greetings, Ronald
---

_______________________________________________
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




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


This email sent to email@hidden


_______________________________________________
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: Looking for empty folders
      • From: Michelle Steiner <email@hidden>
    • Re: Looking for empty folders
      • From: "Mark J. Reed" <email@hidden>
References: 
 >Looking for empty folders (From: Ronald Hofmann <email@hidden>)
 >Re: Looking for empty folders (From: "Mark J. Reed" <email@hidden>)

  • Prev by Date: Background App Questions
  • Next by Date: Re: Looking for empty folders
  • Previous by thread: Re: Looking for empty folders
  • Next by thread: Re: Looking for empty folders
  • Index(es):
    • Date
    • Thread