Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Haresh
Contributor
Contributor

Is there a way to create a folder dynamically based on the first part of the filename in talend before copying the sftp file

I am downloading a file from the remote sftp site and based on the filename for eg:A_B_C.csv before using tfilecopy in talend to transfer the file onto a local folder,how can i create a new folder based on the first part of the filename just before delimiter_(folder called A in this case) and then copy the file onto the specific folder called A?

Or even a java code to parse the filename and extract only A field from the filename (A_B_C.csv) and create a folder/directory and then copy the retrieved file into the same folder

Somebody please help

 

Labels (7)
1 Reply
manodwhb
Champion II
Champion II

@Haresh Sivakumar​ , based on the SFTP file you need to take first occurrence of _ what value do you have right?

 

you need to use tFTPfileproperties and get the filename and then do use the substring and index of function to get the portion of the file name then iterate using tflowtoiterate and then you create a directory and download the file.

 

Thanks,

Manohar