FindFiles
Mon 01 January 2018Syntax
FindFiles(filespec_pattern [, pathtype])
Description
Use the FindFiles function to return a list of the external file names that match the file name pattern you provide, in the location you specify.
Parameters
Field or Control |
Definition |
---|---|
filespec_pattern |
Specify the path and file name pattern for the files you want to find. The path can be any string expression that represents a single relative or absolute directory location. The file name pattern, but not the path, can include two wildcards: * (Asterisk): matches zero or more characters at its position. ? (Question mark): matches exactly one character at its position. |
pathtype |
If you have prepended a path to the file name, use this parameter to specify whether the path is an absolute or relative path. The valid values for this parameter are:
If you donât specify pathtype the default is %FilePath_Relative. If you specify a relative path, that path is appended to the path constructed from a system-chosen environment variable. A complete discussion of relative paths and environment variables is provided in documentation on the File class. See . If the path is an absolute path, whatever path you specify is used verbatim. You must specify a drive letter and the complete path. You canât use any wildcards when specifying a path. The Component Processor automatically converts platform-specific separator characters to the appropriate form for where your PeopleCode program is executing. On a Windows system, UNIX "/" separators are converted to "\", and on a UNIX system, Windows "\" separators are converted to "/". Note: The syntax of the file path does not depend on the file system of the platform where the file is actually stored; it depends only on the platform where your PeopleCode is executing. |
Returns
A string array whose elements are file names qualified with the same relative or absolute path you specified in the input parameter to the function.