Re: How to get the number of items in a selected Folder ?
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: "Stockly, Ed" <email@hidden>
- Date: Wed, 25 Nov 2015 18:37:13 +0000
- Thread-topic: How to get the number of items in a selected Folder ?
set
myFolder to (choose folder)
as alias
tell
application "Finder"
set
allMyStuff to (entire contents
of myFolder)
return
count
allMyStuff
end tell
On a small folder (114 items, most nested) this ran instantly. On a large folder (Application support, 18,000+ items, most nested, it took 1:13
When you say the "whole contents" does that include nested items, in sub folders? List folders only looks at one level, so a folder inside with 100 items would count as 1.
The "entire contents" command will give you the nested items as well, but that has always choked and stalled on large folders.
Tell application "Finder"
Set allMyStuff to count of entire contents of myFolder
End tell
I wanted to scan the whole contents of a selected folder (chose folder), but failed, yesterday.
|
_______________________________________________
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