ListSFTPFile
Description
Retrieves a list of files from a given directory path.
Ensure that you have a properly configured SFTP connection resource set up under the Resources folder.
SFTP file names are typically case-sensitive; therefore, abc.JPG, abc.jpg, and ABC.jpg will be saved as different files. To ensure consistency, we recommend using lower-case file names and extensions: abc.jpg.
Configuring the ListSFTP Activity
The ListSFTPFile Configuration panel has four tabs: Configuration, Advanced, Input, and Output.
Configuration
Name
Required
The name of the activity. This name must be unique in a workflow.
ListRecentSalesReports
Description
Optional
The description of the activity. We recommend you make this as clear as possible to guide execution, foster understanding, and support collaboration.
Lists the most recent sales report files.
Resource
Required
A predefined connection resource for accessing SFTP data.
/Resources/SFTP Resources/SFTPConnection
SFTP Authorization Context
Optional
Defines how credentials are resolved at runtime. Options may include Default, Inherited, or custom contexts.
Default
Directory
Optional
The target directory on the SFTP server where the file is located. Optional if full file path is provided.
/reports/daily/
File Path
Optional
Full file path to a specific file or directory. Used if not using Directory.
/reports/daily/
Pattern
Optional
Filters files based on pattern (e.g., .csv, sales_.csv).
sales_*.csv
Prefix
Optional
Filters files that start with a specific prefix.
sales_2024

Advanced
Sort By
Optional
Sorts the result list by selected criteria: Name, Size, Date Modified, or Path.
Date Modified
Max Results
Optional
Limits the number of files returned in the result set.
10
Descending
Optional
If selected, sorts the results in descending order.
Deselected
Recursive
Optional
If selected, includes files from subdirectories.
Deselected
Input
workingDirectory
Optional
String
The target directory on the SFTP server where the file is located. Optional if full file path is provided.
/reports/daily/
filePath
Optional
String
The complete path to the file on the SFTP server. If provided, it overrides Directory + File Name.
/reports/daily/sales_2024-05-15.csv
fileName
Optional
String
The name of the file to delete. Used with Directory when File Path is not set.
sales_2024-05-15.csv
Output
JSON Schema
Optional
NA
A custom schema that can be imported.
NA
Boolean
Optional
Boolean
Indicates whether the target file was deleted.
true
filePath
Optional
String
Indicates the complete path to the deleted file on the SFTP server.
/reports/daily/sales_2024-05-15.csv
fileName
Optional
String
The name of the deleted file.
sales_2024-05-15.csv
Last updated
Was this helpful?
