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
files("*.*")
FileNames =
for f in FileNames
print f
next
Example 2: List all files matching search string
files("t?st.bas")
FileNames =
for f in FileNames
print f
next
Example 3: Using a path
files("/usr/bin/*") ' Linux
FileNames = ' FileNames = files("C:\*.*") ' Windows
for f in FileNames
print f
next
Code samples using FILES