Re: AppleScript-Users Digest, Vol 12, Issue 583
Re: AppleScript-Users Digest, Vol 12, Issue 583
- Subject: Re: AppleScript-Users Digest, Vol 12, Issue 583
- From: Yvan KOENIG <email@hidden>
- Date: Thu, 26 Nov 2015 16:00:24 +0100
"emile.a.schwarz" < email@hidden> wrote: I wanted to get the number of image files present in a target folder (no nexted folder there) and then use this value in a repeat loop to scan the files in that target folder.
I’ve been using this, which avoids hidden files, icons, etc.
set x to choose folder with prompt "Choose Folder to Count Files" set filecount to do shell script "find " & POSIX path of x & " ! -type d ! \\( -name \".*\" -or -name \"Icon*\" \\) | wc -l" display dialog file count
why not :
set x to choose folder with prompt "Choose Folder to Count Files" tell application "System Events" count (get files of x whose visible is true) end tell
Yvan KOENIG running El Capitan 10.11.1 in French (VALLAURIS, France) jeudi 26 novembre 2015 15:59:26
|
_______________________________________________
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