• 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: Luca Pozzato <email@hidden>
  • Date: Sun, 29 Jan 2006 16:06:28 +0100


On Jan 28, 2006, at 18:50:04, Simon, Garry wrote:

The solution to this probably already exists, but I need a script that will:

• Process a disk or folder dropped onto it
• Search through every level of subfolders for files
• Make a list of the names of the files it finds (excluding the folder names from the list)
• Convert that list to a return deliminated text document (that part I could probably figure out).



set myfolder to choose folder

set MyList to do shell script "ls -R -F " & quoted form of POSIX path of myfolder
--  -R Recursively list subdirectories.
--  -F Display a slash '/'  after each pathname that is a directory -- we need this in order to get rid of them in the next step

--then using regular _expression_ from SATIMAGE scripting addition  exclude every folder name from the list
set myresult to (find text "(^[^\\:\\/]+$)" in MyList using "\\1\\r" with regexp, all occurrences and string result) as text


Ciao

Luca Pozzato
 _______________________________________________
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

References: 
 >Search Folder Hierarchy (From: "Simon, Garry" <email@hidden>)

  • Prev by Date: Re: Force quit filemaker and reopen a file
  • Next by Date: Re: Tell Statement Problem
  • Previous by thread: Re: Search Folder Hierarchy
  • Next by thread: Re: Search Folder Hierarchy
  • Index(es):
    • Date
    • Thread