Skip to content

List files on server

Lists one bounded page of files in a folder on an SFTP or FTPS server.

@lainstack/file-server/list-files · Object storage

Use List files on server to see what is in a folder on an SFTP or FTPS server. Pass a Path from the result to Read file from server, Move file on server or Delete file on server. It does not return file contents.

Good to know:

  • You get one page only. Maximum files defaults to 50 and allows up to 100. When Truncated is true, more entries exist, so narrow the Name pattern or Folder.
  • Each entry has a path, name, size, modified time and kind (file, folder or other). Size and modified time can be empty.
  • Folder is relative to the connection’s root folder. Leave it empty for the root folder itself. A folder that does not exist fails the step.
  • Name pattern is an optional glob on names, such as *.xml. It cannot contain /.
  • An empty list is a normal result, not an error.
Setting Key Type Details
SFTP or FTPS connection (required) credentialId Connection Uses the selected SFTP or FTPS connection. At most 255 characters.
Folder folder Text Folder relative to the connection’s root folder. Empty lists the root folder.
Name pattern pattern Text Optional glob on file names, for example *.xml.
Maximum files (required) limit Number Returns one bounded page of up to 100 entries.
Output Path Type
Files files List
Truncated truncated Yes or no

Last updated: