$FINDFILE (find files)
$FINDFILE searches files in the specified folder.
Syntax
$FINDFILE(folder-name,array-name)
Values
-
folder-name
Specifies a path relative to the base path, as either a constant or a variable. A constant must be enclosed in single quotation marks ('').
-
array-name
Specifies the name of the array that stores the name of the folder and the names of files in the folder, expressed as a variable.
For this array, File and Directory are specified by the key value for file and folder, respectively.
Status
The following table lists and describes the possible statuses:
|
Status |
Description |
|---|---|
|
NORMAL |
Normal end |
|
ERROR |
The specified folder is invalid. |
|
Script execution interrupted |
Indicates one of the following
|
Example
This example searches files in Asset-Console-installation-folder\wwwroot\bin and outputs the name of the first file:
$FINDFILE('bin', FileData)
FILE=$GETARRAY(FileData, 1)
$ECHO(FILE)- Execution result:
-
bin\default.htm