Getting the content of a folder

Hi People

I know it is a very bassic thing but…
I have it all working in AppleScript, but I can’t get it right in AS.Studio.
I set Org_Folder to choose a folder containing some files.
Now, when I try to get the content of that folder (e.i. the number of items (files only) and the name of this files.) all I get is the path but not the content.
I need to make a list of this files.

thank you a gain

set f to (choose folder)
set fContents to (list folder f)

Hi JJ

Did that and got the message: “NSInternalScriptError (8)”
I put a “display dialog” line to see if the resolt is corect, but the message came before that

set Org_folder to choose folder with prompt "Choose the folder containing the original files"
set number_OrgItems to (list folder Org_folder)
display dialog number_OrgItems

thank you

I think your are missing just a “as string” in the end of your last line.

True “number_OrgItems” is a list of strings.
If you use “Build and Run” from Xcode/ProjectBuilder, use “log” instead of “display dialog”, and you’ll see such list in the run log.

and how do I get the number of items in the folder - not inclooding the .DS_Store file

O.K. I got it working