I need to retrieve the Filenames and Last Modified Date of files on an FTP Server

Does anyone know what classes need to be imported and does anyone know how pub.client.ftp.ls uses the sessionkey ??

Cheers,
David Krivohlavy

In the input of pub.client.ftp:ls service, set the value for orderby as ‘timestamp’ which will return the list in order.

Retrieved from the output of pub.client.ftp:login service. It uses this session information to execute all the commands and this is valid unless it is logged out. You should invoke the logout service which will close the session, else when there maximum sessions reach, there wont be new sessions created…

-Senthil

Hi Senthil,
We have an existing service that uses pub.client.ftp:login, …ftp:cd, …ftp:ls, …ftp:get, …ftp:logout.
I now need to retrieve the last modified date of the file via …ftp:ls (or an internal version of it) to use in determining further processing within the flow service. I’d prefer to only replace the pub.client.ftp:ls service instead of having to replace all of the webMethods internal FTP java services and having to import org.apache classes. So I need to know which classes I need to import (on the “Shared” tab of the Java Service) and what pub.client.ftp:ls does with the sessionkey so that I can replicate it in a customised version of …ftp:ls that would return the filename AND the Last Modified Date in a string list. Has anyone done that before ??

Cheers,
David