FTP -- List files by timestamp

I am trying to list files in an FTP directory (using pub.client.ftp:ls) and order them based on timestamp.

There is an ‘orderby’ input parameter to the ls service, and I am getting files in the correct order. But the service is not listing any files when I use another input parameter ‘filenamepattern’ along with this parameter. I want to be able to use both these parameters together, as I have a filtering criterion as well.

Is there any work around for this? Please also mention if there is any other way to list the files.

Thanks,
Raj

I believe you can use both at a time and they are optional…

what filenamepattern format you are passing?

I tried different filenamepatten combinations (Ex: ., *.csv). I am getting proper listing when I pass only filenamepattern or only orderby (timestamp). But when I pass both, I am getting a returncode of 550.