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: Deivy Petrescu <email@hidden>
- Date: Sat, 03 Jan 2015 10:58:49 -0500
> On Jan 3, 2015, at 10:46 , 2551 <email@hidden> wrote:
>
>
>> On 3 Jan 2015, at 21:47, Deivy Petrescu <email@hidden> wrote:
>
>> Actually, there is a command to do exactly that.
>> It had been broken for a very long time, and everyone complained about that.
>> After it was fixed it has been rarely mentioned.
>>
>> <script>
>> tell application "Finder"
>> set mainfldr to target of window 1
>> return entire contents of mainfldr as alias list
>> end tell
>> <script>
>>
>> It is very fast too!
>>
>
>
> That just times out on my system if done on the home directory (didn't try it on anything smaller).
You are right.
It times out here too.
It was pretty fast on my desktop which has many files and folders.
>
> For this kind of task, sed is your friend, combined with a bit of ls -R (Ahh, Yvan, beat me to it!) and grep:
>
> In Terminal, navigate to the directory you want to list with
>
> cd
>
> Then
>
>
> ls -R | grep ":" | sed -e 's/://' -e 's/[^-][^\/]*\//--/g' -e 's/^/ /' -e 's/-/|/' | open -f
Indeed.
This is really good.
And it is fast.
>
>
> I think you'll find that's....pretty fast, even on your home directory.
>
> Phil
Deivy Petrescu
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