RFFILE.RFListFiles 

short RFListFiles(BSTR pszFileMask)
short RFListFilesEx(BSTR pszFileMask)

Function RFListFiles(pszFileMask As String) As Integer
Builds a reduced filename array with the contents of the WS Client memory.

Function RFListFilesEx(pszFileMask As String) As Integer
Builds an extended filename array with the contents of the WS Client memory.

Return value
The number of files that match the mask, or -1 if an error occurs.

Parameters

pszFileMask 
    A file mask to filter the filenames. Give a filename or a string that contains DOS wildcard characters (* or ?), e.g. "*.txt", "DATA??.DAT" , etc.

Remarks
The "reduced" list contains only the filename, the "extended" list contains the name, size, date and time.

Example
Public wsRfFile As New RFFILE
Dim iIdx As Integer
...
If wsRfFile.RFListFiles("*.*") < 0 Then
    GoTo EndProgram ' RF error ...
End If

' Get the name of each file
For iIdx = 0 To wsRfFile.RFFileCount - 1
    sBuff = wsRfFile.RFFileName(iIdx)
    ' Process data
    ...
Next iIdx

See also    RFFILE, RFFileCount