Sorry for all the posts on this everyone, but this got me thinking about my current implementation and how it could be improved.
Here’s an FTP flow that will get back the directories and files, retrieve all the files for the parent directory, then traverse the all the subdirectories and retrieve their files.
pub.client.ftp:login
pub.client.ftp:dir (retrieves detailed list of all files and directories)
LOOP on /dirlist
BRANCH on /dirlist
/^-/ SEQUENCE (regex to pick the files)
pub.string:tokenize (tokenize current dirlist detail into valueList)
pub.client.ftp:get (with local and remotefile set to %valueList[8]%)
/^d/ SEQUENCE (regex to pick the dirs)
pub.string:tokenize (tokenize current dirlist detail into valueList)
pub.client.ftp:cd (with dirpath set to %valueList[8]%)
(AND THEN REPEAT EVERYTHING FROM pub.client.ftp:dir ABOVE for this dir)
I’m sure I could make this more efficient with some time (I’d likely modularize the repeated section), but it’s back to the grindstone for now.
Hope this helps start someone’s thinking on this problem when they encounter it.
#webMethods#webmethods-Protocol-and-Transport#Integration-Server-and-ESB