FF.Find |
![]() ![]() |
nFiles = FF.Find( hHandle AS HANDLE, FileAttributes AS INTEGER = EL_FF_NormalFiles ) AS INTEGER
Finds the files that matches the file mask specified in FF.Open and the conditions set by FF.SetOption. The number of files currently found is returned. Note that you can do multiple calls to FF.Find with different conditions. The files found will not be reset until you call FF.Reset or FF.Close.
Example:
OPTION BASE 1
$LIBRARY "MyBASIC2_ExtLib" $INCLUDE "MyBASIC2_ExtLib"
DIM hFF AS HANDLE DIM nFiles AS INTEGER DIM i AS INTEGER DIM tmpFile AS STRING
CLS
' Folder to Search CONST cFolder = "D:\Tech\Projects\COMMON\MyBASIC2\CodeTemplates"
' Open the File Finder and search for Code Template files hFF = FF.Open( cFolder, "*.ct2", TRUE )
' Find all "normal" files nFiles = FF.Find( hFF, EL_FF_NormalFiles )
' Print Result of Search FOR i = 1 TO nFiles PRINT FF.GetFilePath( hFF, i ), ENDFOR
PRINT , PRINT "Total File(s) "; FF.GetFileCount( hFF ),
' Close the File Finder FF.Close( hFF )
END
|