FileList

Description:

baFileList returns a list of files in a folder.

Platforms:

Windows and Macintosh

Usage:

Result = baFileList( Folder, FileSpec )

Arguments:

String, string.
Folder is the name of the folder to list.
FileSpec is the pattern of files to match.

Returns:

List.
Returns the list of matching files. If Folder doesn't exist, then an empty list/string is returned.

Examples:

Director:
Files = baFileList( "c:\windows", "*.*" )

Authorware:
Files := baFileList( "c:\\temp", "*.bmp" )
 

Notes:

On Windows, the FileSpec is a DOS wildcard, eg "*.bmp". Only one type can be specified. Use an empty string or "*.*" to match all files.

On Macintosh, the FileSpec can be either a four character type code eg "TEXT" or an extension eg ".txt". Only one type or extension can be specified. Use an empty string or "*.*" to match all files.
 

See also:

baFolderList