FINDFILE Function
Returns a string array containing the names of all files matching a specified file description.
Usage
Input Parameters
file_specification—A scalar string used to find files. May contain any valid shell wildcard characters. If omitted, all files in the current directory are supplied.
'Rogue Wave\wave\xres'
files=FINDFILE('”\Rogue Wave\wave\xres”')
Returned Value
result—A string array containing the names of all files matching file_specification. If no files with matching names exist, returns an array with a single empty element.
Keywords
Count—A named variable into which the number of files found is placed. A value of 0 indicates that no files were found.
Verbose (Unix only)—If set, allows the shell process to print all messages it produces to stderr. Otherwise it is silent even when an error occurs. Default: Verbose is off.
Discussion
FINDFILE returns all matched filenames in a string array, one file name per array element.
SHELL environment variable (or /bin/sh if SHELL is not defined) to search for any files matching file_specification. Example
This example searches the wave/lib/std directory for PV‑WAVE procedure files that start with the letter 'x'.
CD, !Dir + '/lib/std', Current=curr_dir
result = FINDFILE('x*.pro', Count=cntr)
PRINT, result
; PV-WAVE prints:
; xbar.pro xrchart.pro xschart.pro
PRINT, cntr
; PV-WAVE prints: 3
CD, curr_dir