• 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: Search Folder Hierarchy
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Search Folder Hierarchy


  • Subject: Re: Search Folder Hierarchy
  • From: Martin Orpen <email@hidden>
  • Date: Sat, 28 Jan 2006 19:04:47 +0000

On 28 Jan 2006, at 6:55 pm, has wrote:

Save as applet:

on open {f}
tell application "Finder" to set lst to name of every file in entire contents of container f
set text item delimiters to return
tell application "TextEdit" to make new document with properties {text:lst as Unicode text}
end open


This approach'll suck performance-wise if there's a very large number of files, however. If this is an issue, consider using the unix shell instead, e.g. something like:

ls -R /path/to/sourcefolder | egrep '^[^/]+$' | sort -f > /path/ to/outputfile.txt

would produce a UTF8-encoded text file containing a nicely sorted [1] list of linefeed-delimited filenames.


Alternatively, you can just drag a folder onto an open BBEdit or TextWrangler document.

I''ve always loved that feature. Easy, and fast. And free if you use TextWrangler.

Regards

--
Martin Orpen


_______________________________________________ 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
  • Follow-Ups:
    • Re: Search Folder Hierarchy
      • From: Bill Briggs <email@hidden>
    • Re: Search Folder Hierarchy
      • From: Adam Bell <email@hidden>
References: 
 >Re: Search Folder Hierarchy (From: has <email@hidden>)

  • Prev by Date: Re: FTP Upload
  • Next by Date: Re: FTP Upload
  • Previous by thread: Re: Search Folder Hierarchy
  • Next by thread: Re: Search Folder Hierarchy
  • Index(es):
    • Date
    • Thread