Re: recursive folder count
Re: recursive folder count
- Subject: Re: recursive folder count
- From: "Mark J. Reed" <email@hidden>
- Date: Thu, 28 Feb 2008 16:23:35 -0500
Do you want all items or just subfolders?
I think this will work (untested):
tell application "Finder" to count(get entire contents of sourceFolder)
You might be able to restrict it to subfolders with a whose clause.
Or to count only subfolders using find:
Do shell script "find " & quoted form of POSIX path of sourceFolder &
" -type d -print | wc -l"
On 2/28/08, Skeeve <email@hidden> wrote:
> It shouldn't break your script as you already used "quoted form of ..."
>
> I wouldn't use ls and sed but just find:
>
> 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"
> _______________________________________________
> 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
>
--
Mark J. Reed <email@hidden>
_______________________________________________
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