List subfolders in a FTP folder

One Star

List subfolders in a FTP folder

Hello,
I try to get the name of some subfolders in an FTP folder "X".
I have made this job :
tFTPConnection_1
|
|
OnSubjobOk
|
|
tFTPFileList_1 (look in the folder "X" with the filemask "*")
|
|
Iterate
|
|
tFTPFileProperties (schema : "abs_path", "dirname", "basename", "size", "mtime", "mtime_string")
|
|
Main
|
|
tLogRow

In the tLogRow output, I can see this :

|||||
|||||
|||||
//gil/requetes/logexport 2011-10-1 3h2m48.txt|/|/gil/requetes/logexport 2011-10-1 3h2m48.txt|103|1317436542000|Sat Oct 01 04:35:42 CEST 2011
//gil/requetes/logexport 2011-10-10


The 3 first lines corresponds to subfolders and the last one is a file.
It seems that the default schema used in tFTPFilelist doesn't works with folders, how do I get the name of the subfolders ?
In the TOS component documentation, it is written that "tFTPFileList" and "tFTPFileinformation" components can be used with folders but I can see any scenario or information about that.
Best regards,
Emmanuel
Six Stars

Re: List subfolders in a FTP folder

I don't have experiences with this component, but still I see you can use some Talend String functions to cut of the full file path only the directory even if it seems to be just workaround... or report the bug if you think you found one.
Ladislav
One Star

Re: List subfolders in a FTP folder

The variables at output of tFTPFileproperties are correct with files but they are blank with folders (using the default schema).
So I can't use Talend string functions because the initial variable is empty...
One Star

Re: List subfolders in a FTP folder

Any ideas to get the subfolder's names in an FTPFileList component ?
Thanks by advance !
Emmanuel
One Star

Re: List subfolders in a FTP folder

Hi,
It seems it's not possible with this component... I think you probably have to create your own component....