getting directory lists

Terry Vogelaar terry at discovery.nl
Thu Feb 7 23:19:01 EST 2002


> I need to be able to read the contents of the default folder, that is,
> read a directory list of its contents into a variable. By this I mean I
> want to build a little system for my students that has three folders
> within the default folder, along with a standalone runrev application.
> Then I want to be able to somehow read the contents of the folders (that
> is, the filenames and folder names within the folders) so that I can
> then read the contents of those files and folders into my runrev
> application. That way I don't have to hardwire all of the filenames,
> etc, but can dynamically determine what they are. Rinaldi had externals
> for this sort of thing in HyperCard, as I recall. Thanks.

Look in the transcript dictionary for the functions "folders" and "files".
That should be exactly what you are looking for.

Besides that, Rinaldi's great GetDir should work as well. But mind that the
path in GetDir should be with colons instead of RR-standard slashes. (Well,
that is when you work with Mac OS Classic; I don't have a clue what will
happen with GetDir on Mac OS X)

Terry





More information about the Use-livecode mailing list