Skip to content

TSTool / Command / ListFiles


The ListFiles command lists files in a folder and saves the list to a table. The table can then be used to drive processes, such as looping with For command and working with a template. 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.


ListFiles Command Editor Showing Conditions Test (see also the full-size image)

Command Syntax

The command syntax is as follows:


Command Parameters

Parameter                 Description Default                
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.
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.


See the automated tests.


See Also