Get folders, subfolders and files recursively using scp components

Four Stars

Get folders, subfolders and files recursively using scp components

How to get folders, subfolders and files in these folders recursively using any of the ftp, scp components?
Moderator

Re: Get folders, subfolders and files recursively using scp components

Hi,

To get folders, subfolders  and files name recursively? Or to retrieve files and /or folders based on a defined filemask pattern by using TalendHelpCenter:tFTPFileList?
Could you please elaborate your case with an example with input and expected output values?

Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Four Stars

Re: Get folders, subfolders and files recursively using scp components

the folder structure is like ...
a1/a21/a31.txt
a1/a22/a32.txt
a1/a23/a33.txt
b1/b21/b31.txt
...
I need to get all the txt files using ftp component. It is little more complicated than this but this is the first step.
Moderator

Re: Get folders, subfolders and files recursively using scp components

Hi,
Have you tried this component tFTPFileList and set the filemask as "*.txt" to get your files in folders? What does the actual result look like?
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: Get folders, subfolders and files recursively using scp components

Hello, 
I have the same problem, I'm trying to find files that correspond to a fileMask from several direcories from a distant FTP server.
Bellow directories structure of my ftp server:
/prod/exploit/subsidiary1/FileAAA
/prod/exploit/subsidiary2/FileAAA
/prod/exploit/subsidiary3/FileAAA
/prod/exploit/subsidiaryN/FileAAA
My aim is to retrieve "*AAA" Files by looping on all subFolders and get the content of selected files one by one.
Can you please help me?
Salmane
Moderator

Re: Get folders, subfolders and files recursively using scp components

Hi Salmane,
You can use component TalendHelpCenter:tFTPFileList to retrieve your files based on a defined filemask pattern "*AAA"  and iterate on each of them by connecting to a remote directory FTP and then save the files in a defined local directory by using tFtpget component.
The workflow should be:tFtpConnection-->tFtpfilelist-->tFtpget
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: Get folders, subfolders and files recursively using scp components

Hello Sabrina,
Thank you for your answer.
I've used exactly the same flow as you described, but I think that "tFTPFileList" does not get files from subfolders, it looks for those who contain the precised mask in root folder and not in subfolders.
Can you please give me the configuration of each component?
Thank you in advance.
Salmane