FILES

FILES (exp)

Returns an array with the filenames. If there are no files, FILES returns an empty array. exp can contain the wildcards * and ?. exp can include a path.

Example 1: List all files in the current directory

FileNames = files("*.*")

for f in FileNames
    print f
next

Example 2: List all files matching search string

FileNames = files("t?st.bas")

for f in FileNames
    print f
next

Example 3: Using a path

FileNames = files("/usr/bin/*")    ' Linux
' FileNames = files("C:\*.*")      ' Windows

for f in FileNames
    print f
next
File
If there is insufficient information on this page and you wish learn more about FILES, please send an email to smallbasic@gmail.com. You can help to improve information about FILES by submitting a pull request, click View Source for details. Note, an offline language reference text file is also available - see the Download section.