Documentation

FileFindNext

The function continues the search started by FileFindFirst().

bool  FileFindNext(
   long      search_handle,         // Search handle
   string&   returned_filename      // Name of the file found
   );

Parameters

search_handle

[in]  Search handle, retrieved by FileFindFirst().

returned_filename

[out] The name of the next file or directory found.

Return Value

If successful returns true, otherwise false.

Example:

void OnStart()
  {
   string filename;
   int i=0;
//---
   int search=FileFindFirst("*.*",filename);
   if(search!=INVALID_HANDLE)
     {
      Print("FileFindFirst returned",filename);
      while(FileFindNext(search,filename))
        {
         i++;
         Print(i,":",filename);
        }
        FileFindClose(filename);
     }
   else
      Print("Files not found!!!");
  }

See also

FileFindFirst, FileFindClose