Re: Does AppleScript have arrays within the language?
Re: Does AppleScript have arrays within the language?
- Subject: Re: Does AppleScript have arrays within the language?
- From: "Nick Middleweek" <email@hidden>
- Date: Wed, 13 Dec 2000 17:29:53 -0000
Guy,
In order to loop through the files in a folder do we have to put them into a
list and loop through the list or can we just loop through the files of the
folder object?
TIA
Regards
Nick
----- Original Message -----
>
On 12/13/00 9:54 AM, Paul sent:
>
>
> Does AppleScript have arrays within the language?
>
>: If so, is it possible to list all files from within a
>
>: local folder and place the file names into the array?
>
>: If this isn't possible, another proposed solution would
>
>: be much appreciated.
>
>
Lists are similar to arrays. You can also have lists of lists.
>
>
Here is a sample Applescript that will do what you ask given a particular
>
folder reference;
>
>
tell application "Finder"
>
set y to every file of folder "A Folder" of disk "My Hard Disk"
>
end tell
>
>
'y' will be a list of files.
>
>
Later,
>
Guy
>
>
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
>
Guy Algot, Graphic Dimensions Consulting (403) 861-9882
>
email@hidden Calgary, Alberta
>
"The higher, the fewer!" Mac consulting/4D development
>
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
>
'Remember that as a teenager you are in the last stage of your
>
life when you will be happy to hear that the phone is for you'
>
-- Fran Lebowitz
>
_______________________________________________
>
applescript-users mailing list
>
email@hidden
>
http://www.lists.apple.com/mailman/listinfo/applescript-users