Get Files and Folders
Description
Lists both files and folders in a remote directory.
Prerequisites
Create and test a SFTP connection with access to the remote paths used by the activity. Paths identify locations on that server, not on the workflow host.
Shared settings
Select Connection Name. Use Process Data for dynamic path values. Configure execution control and On Error as required.
Inputs
| Property | Description |
|---|---|
| Remote Path | Directory to list. The designer default is /. |
| Recursive | Include nested directories. Default: False. |
Outputs
| Output | Description |
|---|---|
| Directory Listing | Combined directory listing. |
| Files | File references from the listing. |
| Folders | Folder references from the listing. |
| File Count | Number of files returned. |
| Folder Count | Number of folders returned. |
Behavior
The file and folder outputs are provider-backed references with expandable metadata such as name, full path, size for files, and last-modified time where the server supplies it. Bind the whole reference to a compatible file/folder input; bind Full Path when another SFTP activity requests a path string. Retrieving a reference does not copy the bytes to the workflow host.
Example
Set Remote Path to /reports. Process Files and Folders separately, using their counts to determine whether either collection contains items.