Valid on NetWare, Symbian OS, UNIX, Windows and Windows CE
The FindFirst function returns the name of the first file that matches a specified filter.
This file content function has the format:
FindFirst(Filter as string, Attrib as integer) as string
FindFirst(Filter as string) as string
Specifies the files to include in the scan. This parameter can contain a drive specification, a path, and a file name for the files to be found. The file name can contain wildcard characters (? or *).
Specifies the file attribute for selecting eligible files in the scan. If the Attrib parameter is omitted, FA_ALLFILES is assumed. Attrib can be selected by ORing the following values:
Normal file, no attributes
Read-only files
Hidden files
System files
Volume label
Directory
Archive files
All files
Any file
On successful completion, the FindFirst function returns a string containing the file name of the first matching file. Otherwise, it returns an empty string.
Example: FindFirst function
This example finds and lists all files with the .bat extension in the root directory of the C: drive.
Dim Filename as string
Filename=FindFirst("C:\*.BAT",FA_ANYFILE)
while Filename<>""
print Filename
Filename=FindNext()
wend
|
Copyright © 2013 CA.
All rights reserved.
|
|