Skip to content

StateDMI / Command / ListFiles


Overview

The ListFiles command lists files in a folder and saves the list to a table. The table can then be used to drive processes. The resulting table will include the following columns:

  • FileName – name of the file without leading path
  • RelativePath – name of the file as a relative path (relative to the command file working directory)
  • AbsolutePath – name of the file as the full absolute path

Command Editor

The following dialog is used to edit the command and illustrates the command syntax. See also the full-size image.

ListFiles command editor

ListFiles Command Editor Showing Conditions Test

Command Syntax

The command syntax is as follows:

ListFiles(Parameter="Value",...)

Command Parameters

Parameter                 Description Default                
Folder
required
The path of the folder for which to list files. None - must be specified.
IncludeFiles A pattern indicating files to include from Folder. Use * in the filename for a wildcard. All files will be included.
ExcludeFiles A pattern indicating files to exclude from Folder, checked after the IncludeFiles parameter is checked. Use * in the filename for a wildcard. No files will be excluded.
TableID
required
The identifier for the table to output the list. If the table does not exist, it will be created. See also Append. None - must be specified.
Append Indicate whether list output should be appended to the table. This allows multiple ListFiles commands to be used to create a larger list. False - the table will contain only the current output list.

Examples

See the automated tests.

Troubleshooting

See the main troubleshooting documentation

See Also

There are no additional related commands.