• 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: Finder Scripting Speed
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Finder Scripting Speed


  • Subject: Re: Finder Scripting Speed
  • From: "Laine Lee" <email@hidden>
  • Date: Tue, 2 May 2006 11:27:34 -0500

On 5/2/06 11:19 AM, "Laine Lee" <email@hidden> wrote:

>> set allFolders to every folder of entire contents of folder
>
> should perhaps be
>
> set allFolders to every folder of entire contents of scans_folder
>
>
> Laine

Well, anyway, no problem unless chosen folder contains scans and no folders.

----
set the scans_folder to (choose folder with prompt "Pick the folder
containing the scans you want to log:")
set folder_record to {}
tell application "Finder"
    try
        set allFolders to (every folder of (entire contents of scans_folder))
        scans_folder
        repeat with someFolder in allFolders
            set someFolder to contents of someFolder
            set ctfls to count of files in someFolder
            set end of folder_record to {folder_name:someFolder as string, file_count:ctfls}
        end repeat
    on error
        set someFolder to (contents of folder (scans_folder as alias))
        set ctfls to count of files in someFolder
        set end of folder_record to {folder_name:someFolder as string, file_count:ctfls}
    end try

end tell
folder_record
----

--
Laine Lee
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: Finder Scripting Speed
  • Next by Date: run as root
  • Previous by thread: Re: Finder Scripting Speed
  • Next by thread: Permanently deleting items with Finder.
  • Index(es):
    • Date
    • Thread