Highlighted
One Star

How to iterate a ftp site to browse subdirectories to get files?

Hello,
I'd like to use tFtpGet to retreive many files from a ftp server matching to file mask. However, I have many subdirectories to browse to catch these file.
How can I process to get through subdirectories names and file mask specification in a talend job?
JNB
4 REPLIES
One Star

Re: How to iterate a ftp site to browse subdirectories to get files?

Is there a response at this question? im blocked on this to. I'd like to iterate folder and subfolders to catch files an copy them to local machine? It is possible?
One Star

Re: How to iterate a ftp site to browse subdirectories to get files?

I have the same requirement. Anyone figure out how to do this?
Would also really appreciate any summary of how you worked around the need, even if it's not cleanly with a built-in Talend component..
thanks!
One Star

Re: How to iterate a ftp site to browse subdirectories to get files?

Hello,
To iterate the ftp Server, I made a "static" mapping between subdirectories definitions from a file so that I could try to retrieve files according to already known subdirectories.
JNB
One Star

Re: How to iterate a ftp site to browse subdirectories to get files?

you can use tftpfilelist to list the directories on the ftp site and then use another tftpfilelist to go through the directories listed by the first one, I knew there was only 2 levels of dir's to do. Its not great but it worked.
However I would think you could put it into a loop to recursively go through an unlimited number of dir's, probably only using 1 tftpfilelist component.