5.23.13 LIST

The LIST command is used to retrieve a list of files and directories from the SFTP server.

The path can contain operating system wild characters.

The list object argument requires one, two or five fields.

If a one field list is being used, then the unprocessed lines are added to the list.

If a two-field list is being used, the first field receives the file type and second field receives the file name.

If a five-field list is being used, the first field receives the file type, the second field receives the date, the third field receives the time, the fourth field receives the size and fifth field receives the file name.

The type field can contain the following values:

Syntax:

Command

Keyword

Value

Developer notes

LIST

PATH

value

Optional. Directory path.
Default is Current directory.
The path can contain operating system wild characters.

TIMEZONE

value

Optional. Time zone of FTP server.
Default is JVM default time zone.

 

Example

LIST PATH(/folder/*.csv) #WRKLST(LINE)

 

LIST PATH(/folder/*.csv) #WRKLST(TYPE,NAME)

 

LIST PATH(/folder/*.csv) #WRKLST(TYPE,DATE,TIME,SIZE,NAME)