FILEREADDIR
 
Syntax


FUNCTION FILEREADDIR( filenumber ) AS STRING

Description


FILEREADDIR is built into version 8.30 and later.

Reads the Nth entry in the directory file list.
Returns the file name or an empty string if there are no more files.

Example

    dim file_number as integer
    dim file_name(16) as string

    file_number = 0
    file_name = ""

    do
	file_name = filereaddir(file_number)
	if file_name <> ""
		print "file "; file_number; " is "; file_name
	endif
	file_number += 1
    loop until file_name = ""
  

Differences from other BASICs

See also