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
File
ACCESS
BGETC
BLOAD
BPUTC
BSAVE
CHDIR
CHMOD
CLOSE
COPY
DIRWALK
EOF
EXIST
FILES
FREEFILE
INPUT
INPUT
KILL
LOCK
LOF
MKDIR
OPEN
READ
RENAME
RMDIR
SEEK
SEEK
TLOAD
TSAVE
WRITE
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.