Re: Script that "Tells" Finder just Focuses on Finder instead of running
Re: Script that "Tells" Finder just Focuses on Finder instead of running
- Subject: Re: Script that "Tells" Finder just Focuses on Finder instead of running
- From: Shane Stanley <email@hidden>
- Date: Sun, 04 Jan 2015 12:28:45 +1100
On 4 Jan 2015, at 3:52 am, Deivy Petrescu <email@hidden> wrote:
>
> Phil’s solution is by far the fastest and possibly the best solution.
I disagree. Yes, it's the fastest -- but as Yvan alluded to, it ignores packages. Run it on a folder containing some rtfd files, or some apps, or any other package files, and it will treat them as folders and list their contents. IMO that rules it out as the best solution.
Recursively looping through with the Finder or System Events is slow, but at least they know what's a folder and what's a package. Alex didn't make clear what he was after exactly -- his sample output suggested he only wanted one level of subfolders deep. If that's the case, it shouldn't be too bad -- and there would be no point in using entire contents (and the shell offering would need to be rewritten to deal with that, too).
If you want both fast and accurate, your best bet IMO is ASObjC. But you knew I was going to say that. It would probably be a tad slower than the shell command, but not noticeably, and would be considerably faster than the Finder. I'd post some code, but there's not much point until Alex clarifies whether he wants full recursion or not (and if so, how to format it so the hierarchical content makes sense).
--
Shane Stanley <email@hidden>
<www.macosxautomation.com/applescript/apps/>
_______________________________________________
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