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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
muralam
Creator
Creator

Copying files to multiple destination folders

Hi,

I have 9 files with different names in input folder

Input:

ABC_talend_yyyy-mm-dd_00.csv

TENG_ABC_talend_yyyy-mm-dd_00.TXT

TANG_ABC_talend_yyyy-mm-dd_00.TXT

DEF_talend_yyyy-mm-dd_01.csv

TENG_DEF_talend_yyyy-mm-dd_01.TXT

TANG_DEF_talend_yyyy-mm-dd_01.TXT

GHI_talend_yyyy-mm-dd_02.csv

TENG_GHI_talend_yyyy-mm-dd_02.TXT

TANG_GHI_talend_yyyy-mm-dd_02.TXT

 I need to copy these 9 files to 9 different paths please find the below screen shot, kindly suggest a generic method to achieve this. Thanks in advance.

0683p000009M1fX.jpg

Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable

Hi,

 

    I have created a simple flow with two destination folders but in your case you will have to build multiple if cases.

0683p000009M1bM.png

 

 

We are reading the files using tFileList and iterating one file at a time. tjava is used to orchestrate the flow and do not have any functions in it.

 

You will have to create multiple Run if statements from tjava to do file copy.0683p000009M1fr.png

 

 

Below is a sample flow with pseudo code to move your file to ABC folder. You are reading the current file and taking the substring of it and verifying whether it is ABC. Similarly you will have to do for other folders also.

 

Inside the file copy, you need to configure as shown below.

0683p000009M1ef.png

 

 

Hope I have answered your query. Could you please mark the topic as resolved if you are happy? Kudos are also welcome 🙂

 

Warm Regards,

 

Nikhil Thampi

View solution in original post

4 Replies
muralam
Creator
Creator
Author

can someone please help to fix the below query

Anonymous
Not applicable

Hi,

 

     The most easy way will be to handle it through tfilelist and a series of Runif conditions in an orchestrated way. End of day, we are picking one file at a time and check whether the file name matches with corresponding folder name (or a pattern) and move them accordingly.

 

      I would suggest you to create a draft flow with sample files and if you are stuck, feel free to come back at the point of failure and we can help you there. You just have to add some screenshots of the job flow and the point of error so that we will get more details about it.

 

Warm Regards,

 

Nikhil Thampi

muralam
Creator
Creator
Author

@nthampi

 

could you please help with a simple flow

Anonymous
Not applicable

Hi,

 

    I have created a simple flow with two destination folders but in your case you will have to build multiple if cases.

0683p000009M1bM.png

 

 

We are reading the files using tFileList and iterating one file at a time. tjava is used to orchestrate the flow and do not have any functions in it.

 

You will have to create multiple Run if statements from tjava to do file copy.0683p000009M1fr.png

 

 

Below is a sample flow with pseudo code to move your file to ABC folder. You are reading the current file and taking the substring of it and verifying whether it is ABC. Similarly you will have to do for other folders also.

 

Inside the file copy, you need to configure as shown below.

0683p000009M1ef.png

 

 

Hope I have answered your query. Could you please mark the topic as resolved if you are happy? Kudos are also welcome 🙂

 

Warm Regards,

 

Nikhil Thampi