Previous Topic: FindFirstFile - Search for Files in a DirectoryNext Topic: FindNextFile - Continue FindFirstFile Directory Scan


FindNext

Valid on NetWare, Symbian OS, UNIX, Windows and Windows CE

The FindNext function continues a directory scan, which you use to fetch subsequent files that match the criteria given in FindFirst. FindNext returns one file name for each call of FindNext until no more matching files are found in the directory.

Function format:

FindNext() as string

Each call of FindNext returns one file name. When no more matching files are found in the directory, it returns an empty string ("").

Example:

Dim Filename as string

Filename=FindFirst("C:\*.BAT",FA_ANYFILE)
while Filename<>""
	 print Filename
	 Filename=FindNext()
wend