Re: Looking for empty folders
Re: Looking for empty folders
- Subject: Re: Looking for empty folders
- From: "Mark J. Reed" <email@hidden>
- Date: Fri, 6 Mar 2009 09:51:01 -0500
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 (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden