You use listDirectory to list the files and directories. The located file or directory names are combined in a list. The list is displayed in the parent context in a context object with the specified listObject-Id. The context object is available there after execution of the listDirectory activity.
If an error occurs during the execution of listDirectory then the object is not available.
You can use baseDir (see section “baseDir”) to define a base directory from which listDirectory is run.
The base directory itself is not listed in the result.
File or directory names may be a maximum of 512 characters in length. This is checked before the Ftscript is run. The length of the resulting file or directory name (baseDir and dirnames or baseDir + filenames) is limited. The length is the number of characters plus 1 character if baseDir does not end with a "/". The check is performed while the Ftscript is being run.
For further information, see section “Specifying file and directory names”
You can use the wildcard symbol *//* to list a directory tree in full.
Format
<listDirectory listObject="ID" dirnames > comment? context? partner? baseDir? </listDirectory>
Attributes
Name | Value | Meaning |
| string | Reference to a directory context object. |
| string | Name of the list context object which is displayed in the parent context. No context element with this name may exist. |
| See section “Directory name attributes”. |
Example
|
In the example, all the files from the local directory W:/openFT/ftscript/Test/multi/ are written to the context object FileList.
The list only contains the file names, not the baseDir directory.
The files are distributed in parallel to frg_eis_12/local/bin/ on all the computers in the RemoteHostList.
The context object FileList from the listDirectory activity is displayed in the context of the parent element (in the example, ftscript).