• 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: AppleScript-Users Digest, Vol 12, Issue 583
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


Le 2015/11/26 à 15:47, Jim Weisbin <email@hidden> a écrit :

 "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

References: 
 >Re: AppleScript-Users Digest, Vol 12, Issue 583 (From: Jim Weisbin <email@hidden>)

  • Prev by Date: Re: AppleScript-Users Digest, Vol 12, Issue 583
  • Next by Date: Re: How to get the number of items in a selected Folder ?
  • Previous by thread: Re: AppleScript-Users Digest, Vol 12, Issue 583
  • Next by thread: Re: AppleScript-Users Digest, Vol 12, Issue 583
  • Index(es):
    • Date
    • Thread