FINDFILE function returns a string array containing the names of all
All matched filenames are returned in a string array, one file name per array element. If no files exist with names matching the
a null scalar string is returned instead of a string array. Except for VMS, described below, FINDFILE returns the full path only if the path itself is specified in
. See the "Examples" section below for details.
Result = FINDFILE(
A scalar string used to find files. The string can contain any valid command-interpreter wildcard characters. If
contains path information, that path information is included in the returned value. If
is omitted, the names of all files in the current directory are returned.
A named variable into which the number of files found is placed. If no files are found, a value of 0 is returned.
To print the file names of all the Unix files with "dat" extensions in the current directory, use the command:
To print the full path names of all
files in the IDL
directory that begin with the letter "x", use the command:
To print the path names of all
files in the
subdirectory of the current directory (a relative path), use the command:
Note that the values returned are (like the
) relative path names. Use caution when comparing values against this type of relative path specification.