• 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: Jim Weisbin <email@hidden>
  • Date: Thu, 26 Nov 2015 09:47:18 -0500

 "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



Jim Weisbin | C.T.O. | human
 _______________________________________________
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: AppleScript-Users Digest, Vol 12, Issue 583
      • From: Shane Stanley <email@hidden>
    • Re: AppleScript-Users Digest, Vol 12, Issue 583
      • From: Yvan KOENIG <email@hidden>
  • Prev by Date: Re: How to get the number of items in a selected Folder ?
  • Next by Date: Re: AppleScript-Users Digest, Vol 12, Issue 583
  • Previous by thread: re: How to get the number of items in a selected Folder
  • Next by thread: Re: AppleScript-Users Digest, Vol 12, Issue 583
  • Index(es):
    • Date
    • Thread