File name array = Dir ( Directory [ , File pattern ] )
Returns a string array that contains the names of files located in Directory that matches the pattern. If no pattern is specified, any file name is returned. The pattern can contain the same generic characters than the LIKE operator.
' Print a directory
SUB PrintDirectory(Directory AS String)
DIM File AS String
FOR EACH File IN Dir(Directory, "*.*")
PRINT File
NEXT
END