• 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: Finder can't count?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Finder can't count?


  • Subject: Re: Finder can't count?
  • From: Luther Fuller <email@hidden>
  • Date: Wed, 16 Feb 2011 12:05:06 -0600

On Feb 16, 2011, at 11:35 AM, Robert Poland wrote:
The following script will only count the number of Folders in a Finder window regardless of what's visible or selected. Any ideas?.

Here's an idea ...

tell application "Finder"
activate
set folderAlias to (target of window 1) as alias
set itemCount to (count items of folder folderAlias)
set folderCount to (count folders of folder folderAlias)
set fileCount to (count files of folder folderAlias)
"Item Count = " & itemCount & return & "Folder count = " & folderCount & return & "File Count = " & fileCount
display dialog the result buttons {"OK"} default button 1
end tell

No need for UI scripting.

 _______________________________________________
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

References: 
 >Finder can't count? (From: Robert Poland <email@hidden>)

  • Prev by Date: Re: Finder can't count?
  • Next by Date: Re: Finder can't count?
  • Previous by thread: Re: Finder can't count?
  • Next by thread: Solution: Finder can't count?
  • Index(es):
    • Date
    • Thread