Re: Search Folder Hierarchy
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