Click or drag to resize

FNext Function

X#
Find the next file that matches the file previously found by FFirst().

Namespace:  XSharp.Core
Assembly:  XSharp.Core (in XSharp.Core.dll) Version: 2.19
Syntax
 FUNCTION FNext() AS LOGIC
Request Example View Source

Return Value

Type: Logic
TRUE if another file was found; otherwise, FALSE.
Remarks
FNext() finds the next file that matches the original FFirst() or FFCount() search. In other words, FFirst() gets the first matching file and FNext() finds subsequent matching files. When FNext() returns FALSE, there are no more files left to match. FFCount() returns the number of matches. FAttrib(), FDate(), FName(), FSize(), and FTime() return the attribute, date stamp, name, size, and time stamp of the current matching file, respectively.
Examples
This example uses FFirst() and FNext() to get all visible files matching "C:\DOCS\*.TXT":
X#
1IF FFirst("c:\docs\*.txt", FC_NORMAL)
2    ? FName()            // Return first file matched
3    DO WHILE FNext()    // Find next match
4        ? FName()        // Return second file matched
5    ENDDO
6ENDIF
See Also