Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
akakuman
Contributor
Contributor

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?
Labels (2)
6 Replies
Anonymous
Not applicable

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
akakuman
Contributor
Contributor
Author

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.
Anonymous
Not applicable

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
Anonymous
Not applicable

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
Anonymous
Not applicable

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
Anonymous
Not applicable

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