Re: files in subfolders (was Re: file type question)
Re: files in subfolders (was Re: file type question)
- Subject: Re: files in subfolders (was Re: file type question)
- From: Deivy Petrescu <email@hidden>
- Date: Thu, 9 Oct 2003 22:17:59 -0400
On Thursday, Oct 9, 2003, at 20:43 US/Eastern, Richard Fairbanks wrote:
Hmmmmm. I'm finding that it doesn't return files in subfolders.
It does not! Mostly because it was not asked to!
I have a folder with 86 text clippings, that also contains three other
folders of text clippings.
------
set x to every file of folder "the:path:" whose file type = "clpt"
get the number of items in x
=> 86
------
Is there some additional language that is necessary? Isn't this why
Jon Pugh's "walk folders" is so valuable?
--
Richard Fairbanks * email@hidden
http://www.thehungersite.com/ one click sends food to a hungry person
This ought to do what you want (partially, since you never said what
you want)
---Walking folders---
tell application "Finder"
set FolderToInspect to choose folder
set FolderToInspect to folder FolderToInspect
set initialFiles to {}
my ViewName(FolderToInspect, initialFiles)
end tell
on ViewName(thisFolder, AllFiles)
tell application "Finder"
set end of AllFiles to every file of thisFolder
set lista to every folder of thisFolder
repeat with itm in lista
my ViewName(itm, AllFiles)
end repeat
end tell
return AllFiles
end ViewName
___End____
Make the changes you deem appropriate.
Regards
Deivy Petrescu
http://www.dicas.com/
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.