FILE_FIND_NEXT$

FILE_FIND_NEXT$

RETURNS THE NAME OF THE NEXT FILE OF THE CURRENT DIRECTORY

  • Type: System Variable
  • Parameter: 0
  • Group: Files

ACTION

The system variable FILE_FIND_NEXT$ returns the name of the next file found in the current directory, or the character underscore "_" if there is no next file in the current directory.

Remark: the keyword FILE_FIND_NEXT$ ends by '$' because its value is a string.

Before using FILE_FIND_NEXT$, FILE_FIND_FIRST$ is mandatory to know the name of the fist file of the current directory.

After using FILE_FIND_FIRST$ and FILE_FIND_NEXT$, the current directory must be closed with the keyword FILE_FIND_CLOSE.

SYNTAX: FILE_FIND_NEXT$ in an expression

USE

  • The system variable FILE_FIND_NEXT$ is used to know the name of the next file of a directory.

ERROR

  • None.

EXAMPLE

dim a$

print "content of the current directory :":print

print file_find_first$

a$=file_find_next$

while a$<>"_"

print a$

a$=file_find_next$

end_while

file_find_close

SEE ALSO

FILE_FIND_FIRST$

FILE_FIND_CLOSE