Skip to main content

LoadFileList

Structure

LoadFileList(sMask, sDirectory : String)

Type

Function

Description

This function will load all the files in a directory that match an optional file mask. The function returns an integer equal to the number of files loaded. The files are loaded into memory and can be recalled (during the same script operation) by using the GetFileFromList function.

Parameters

ParameterTypeDescription
sMaskStringAn optional file mask for filtering the files. Use '*' character for wildcards
sDirectoryStringThe directory whose files will be used to populate the list

Example

iCount = LoadFileList("*.TXT", "C:\temp")
for i = 0 to (iCount - 1)
ShowMessage(GetFileFromList(i))

Next