• 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: How to get the number of items in a selected Folder ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to get the number of items in a selected Folder ?


  • Subject: Re: How to get the number of items in a selected Folder ?
  • From: Yvan KOENIG <email@hidden>
  • Date: Thu, 26 Nov 2015 11:31:40 +0100


Le 2015/11/25 à 23:31, Shane Stanley <email@hidden> a écrit :

…

Also, as of 1.3.1, you can save a little typing:

use scripting additions
use framework "Foundation"
use script "BridgePlus" version "1.3.1"

set forder to load framework -- returns SMSForder class
set myFolder to (choose folder)
count (forder's itemsIn:myFolder recursive:true asPaths:false)

Thanks Shane.

I tested your proposal with :

use scripting additions
use framework "Foundation"
use script "BridgePlus" version "1.3.1"

set forder to load framework -- returns SMSForder class
--set myFolder to (choose folder)
set beg to current date
set myFolder to path to library folder from user domain
count (forder's itemsIn:myFolder recursive:true asPaths:false)

It took 6 seconds to do the job and returned the count : 88867 items
Trying to compare, I ran this alternate code

set beg to current date
set myFolder to path to library folder from user domain
tell application "Finder"
with timeout of 200 * 60 seconds
set allMyStuff to entire contents of myFolder
end timeout


count allMyStuff
end tell

At this time, more than twenty minutes after starting it, it’s always running.


Yvan KOENIG running El Capitan 10.11.1 in French (VALLAURIS, France) jeudi 26 novembre 2015 11:31:34



 _______________________________________________
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: How to get the number of items in a selected Folder ?
      • From: Shane Stanley <email@hidden>
References: 
 >How to get the number of items in a selected Folder ? (From: "emile.a.schwarz" <email@hidden>)
 >Re: How to get the number of items in a selected Folder ? (From: "Stockly, Ed" <email@hidden>)
 >Re: How to get the number of items in a selected Folder ? (From: "Stockly, Ed" <email@hidden>)
 >Re: How to get the number of items in a selected Folder ? (From: Yvan KOENIG <email@hidden>)
 >Re: How to get the number of items in a selected Folder ? (From: Shane Stanley <email@hidden>)

  • Prev by Date: re: How to get the number of items in a selected Folder
  • Next by Date: Re: How to get the number of items in a selected Folder ?
  • Previous by thread: Re: How to get the number of items in a selected Folder ?
  • Next by thread: Re: How to get the number of items in a selected Folder ?
  • Index(es):
    • Date
    • Thread