NUM = getfilenum (NAME, P) returns an array of numbers indexing
the filenames (or directory names) matching NAME from the current
directory. The indices are searched in the strings following the
substring P. Wildcards (*) and brackets ([], see rdir) may be used
in NAME, including in intermediate pathnames.
NUM = getfilenum (NAME, P, OPT), where OPT is 'dironly', 'fileonly' or
'filedir', gets the numbers only from the directory names, file names,
or both (by default), respectively.
Examples
If the files 'B01_t12.vec','B02_t18.vec', 'B03_t24.vec' are present
in the current directory,
getfilenum ('*.vec', '_t') returns [12 18 24],
getfilenum ('*.vec', 'B') returns [1 2 3].
n=getfilenum('*/*.JPG','DSC') returns the indices of all the files
matching 'DSCxxx.JPG' in all directories.
See Also
rdir, renumberfile.