• 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: Script that "Tells" Finder just Focuses on Finder instead of running
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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: 2551 <email@hidden>
  • Date: Sat, 03 Jan 2015 22:46:32 +0700


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).

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 


I think you'll find that's....pretty fast, even on your home directory. 

Phil



 _______________________________________________
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: Script that "Tells" Finder just Focuses on Finder instead of running
      • From: Alex Hall <email@hidden>
    • Re: Script that "Tells" Finder just Focuses on Finder instead of running
      • From: Deivy Petrescu <email@hidden>
References: 
 >Script that "Tells" Finder just Focuses on Finder instead of running (From: Alex Hall <email@hidden>)
 >Re: Script that "Tells" Finder just Focuses on Finder instead of running (From: Deivy Petrescu <email@hidden>)

  • Prev by Date: Re: Script that "Tells" Finder just Focuses on Finder instead of running
  • Next by Date: Re: Script that "Tells" Finder just Focuses on Finder instead of running
  • Previous by thread: Re: Script that "Tells" Finder just Focuses on Finder instead of running
  • Next by thread: Re: Script that "Tells" Finder just Focuses on Finder instead of running
  • Index(es):
    • Date
    • Thread