List Files

The List Files activity is a synchronous activity that returns information about files or directories, or a listing of all the files in the specified directory.

General

The General tab has the following fields.

Field Literal Value/Process Property/Module Property Description
Name None The name to be displayed as the label for the activity in the process.
Filename Yes The path and name of the file or directory to monitor.

You can also use wildcard characters to monitor a directory for files that match the provided specification. For example, C:\files\*.log must match any change to a file in the files directory with an extension of .log.

Mode None The type of listing you want to retrieve. You can select from the following options:
  • Only Files
  • Only Directories
  • Files and Directories
Include Timestamp None Select the check box to display timestamp, in addition to the date.

Description

Provide a short description for this activity.

Input

The following is the input for the activity.

Input Item Datatype Description
fileName string The path and name of the directory with files or subdirectories to list. Providing a file or directory name returns the information about that file or directory. You can use wildcards to list files or directories that match the provided specification. For example:
  • C:\files\*.log lists any file in the files directory that have a .log extension.
  • C:\files\mylogs\*.* lists all files in the directory mylogs.

Output

The following is the output of the activity.

Output Item Datatype Description
fileInfo complex Element containing the fullName, fileName, location, configuredFileName, type, readProtected, writeProtected, size, and lastModified data.

This is a repeating element. Each item in the element is a file or directory included in the specified directory matching the provided criteria.

fullName string The name of the file, including the path information.
fileName complex The name of the file without the path information.
location string The name of the file or directory this activity is configured to operate on.
configuredFileName string The path to the file.
type string The type of the file.
readProtected boolean Signifies whether the file or directory is protected from reading
writeProtected boolean Signifies whether the file or directory is protected from writing
size integer The size of the file in bytes.
lastModified string The timestamp indicating when the file was last modified. You can compare values in this element using the compare-dateTime() XPath function.

For example, compare-dateTime($List-Files/ListFilesActivityOutput/files/fileInfo[fileName="myFile.txt"]/lastModified,current-dateTime())

Fault

The Fault tab lists the possible exceptions generated by this activity. For more information about error codes and the corrective action to take, see the TIBCO BusinessWorks™ Container Edition Error Codes guide.

Fault Generated When..
FileNotFoundException The file does not exist and the specified path is either incorrect or not found.