NAME

files - list files in current directory

SYNOPSIS

files [FileSpec]

DESCRIPTION

The files statement displays the names of all files which match the pattern given in FileSpec.  If FileSpec is omitted, the names of all files in the current directory are displayed. 

Special pattern-matching characters which may appear in FileSpec are:

*
Matches any sequence of zero or more characters. 

?
Matches any single character. 

[ . . . ]
Matches any single character which is a member of this character class.  If the first character within the brackets is !, then this pattern matches any single character which is not a member of this character class.  The class is composed of the characters listed within the brackets.  Furthermore, if two characters are listed separated by -, the class includes all the characters lexically between the two, inclusively. 

EXAMPLE

To display the names of all files in the current directory:
	files
To display all files in the current directory which begin with the letters "add":
	files "add*"
To display the names of all files in the current directory which begin with "test" and consist of exactly six characters:
	files "test??"
To display the names of all files in the directory "/etc" which begin with the letter "a", "b", or "c":
	files "/etc/[a-c]*"

SEE ALSO

name

USAGE NOTES

Pattern matching in Basmark QuickBASIC is consistent with that done by the UNIX shells.  In particular, an initial dot (".") in a filename must be matched explicitly by the pattern given in FileSpec.  Also, slashes ("/") in filenames are matched only by explicit slashes in FileSpec.  Finally, if FileSpec matches the name of a directory, all files in the directory are listed. 

DIAGNOSTICS

A "File not found" error occurs if FileSpec matches no existing file. 

from The Basmark QuickBASIC Programmerís Manual by Lawrence Leinweber