• 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: recursive folder count
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: recursive folder count


  • Subject: Re: recursive folder count
  • From: Peter Baxter <email@hidden>
  • Date: Fri, 29 Feb 2008 17:06:15 +1100

Hi,

Try these two scripts on any folder with other folders in it. I'm not talking about how much slower the AS script is. The result is different!
1.
set sourceFolder to choose folder
tell application "Finder"
set filecount to (count (get entire contents of sourceFolder))
display dialog "There are: " & filecount & " files"
end tell


2.
set target_folder to choose folder with prompt "Choose target folder to clean"
set filecount to do shell script "find " & (quoted form of POSIX path of target_folder) & " | wc -l"
display dialog "There are:" & filecount & " files"




On 29/02/2008, at 8:23 AM, Mark J. Reed wrote:

tell application "Finder" to count(get entire contents of sourceFolder)

_______________________________________________ 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: recursive folder count
      • From: Christopher Nebel <email@hidden>
    • Re: recursive folder count
      • From: Skeeve <email@hidden>
References: 
 >recursive folder count (From: Tim Piper <email@hidden>)
 >Re: recursive folder count (From: Skeeve <email@hidden>)
 >Re: recursive folder count (From: "Mark J. Reed" <email@hidden>)

  • Prev by Date: Uninstall script
  • Next by Date: Re: Timing issues with Java executing AppleScript calling iTunes
  • Previous by thread: Re: recursive folder count
  • Next by thread: Re: recursive folder count
  • Index(es):
    • Date
    • Thread