Re: Make list of all files in folder?
Re: Make list of all files in folder?
- Subject: Re: Make list of all files in folder?
- From: JollyRoger <email@hidden>
- Date: Sun, 23 Sep 2001 21:28:20 -0500
Entire contents does not work correctly. You can use FindFile OSAX
<
http://microcosmsoftware.com/findfileosax.html> to do it like this:
tell application "Finder" to set sel to (the selection) as text
set fileList to FindFile in_folder sel with files and folders
JR
On 9/23/2001 7:23 PM, "Rachel Cogent" <email@hidden> wrote:
>
I am attempting to make a list of all the files in a folder and subfolders,
>
however the "entire contents of" returns an empty list. I have looked all
>
over the Finder dictionary how to do this. does it say this stuff anywhere
>
in plain language? Is this how it is, every little step of the way is a huge
>
obstacle? Please tell me there is a way to learn this stuff without posting
>
a question and waiting for every little modification.
>
>
tell application "Finder"
>
try
>
set sel to selection as alias
>
if (sel's kind) = "folder" then
>
try
>
set allFiles to <<entire contents of>> sel's files as alias
>
list
>
on error errMsg number errNum
>
set allFiles to sel's files as alias as list
>
end try
>
end if
>
on error errMsg number errNum
>
tell me to display dialog errMsg & return & return & errNum
>
end try
>
end tell