FTP LS files using orderby parameter not working on 10.3

Hi
Firt,I am working on 10.3 version of webMethods,

I am trying to get fiels from a FTP server and need to get files by timestamp ordered.

I put parameter orderby to pub.client.ftp:ls method but it gets files unorderd, as I see it gets files order by fileNames.

Any help would be helpful.



image

Thanks.

Hi Mehmet,

according to the IS Built-In-Services Reference it might happen that this is not supported by the remote FTP server.

pub.client.ftp:ls

WmPublic. Retrieves the file list during an FTP session. (This service corresponds to the
standard FTP command ls namepattern.)

Input Parameters:
sessionkey String Unique key for the current FTP session. The sessionkey is returned by the pub.client.ftp:login service.
filenamepattern String Optional. Pattern that specifies the names of the files to include in the list (for example, *.txt).
orderby String Optional. The order of the returned file list.

Value of orderby:
Description
none Default. Sends an NLST command to the remote FTP server.
timestamp Returns the list in order of the timestamp. Sends an NLST -t command to the remote FTP server.

Note: The -t command is not part of the RFC959 standard. Some FTP servers may not support this command.
Servers that support this command may return the results in either ascending or descending order of creation time.

Output Parameters:
dirlist String List List of file names matching filenamepattern.
returncode String Standard FTP protocol return code.
returnmsg String Standard FTP protocol return message.
logmsg String FTP log messages for the entire user session.

Usage Note
During an FTP session, this service uses the character set specified in the encoding
parameter of the pub.client.ftp:login service. If the file list this service retrieves includes
characters from other languages, set the encoding parameter appropriately. For example,
set encoding to SJIS for file names containing Japanese characters. If you do not set
encoding in pub.client.ftp:login, the default JVM encoding is used.

You will have to investigate this with your FTP server provider.

Regards,
Holger

2 Likes

So can I ask that , are there anyway to get last Modified date of the file in a FTP folder using IS built in services ?