Search code examples
talend

Copy files from one folder to another in talend using context variables


I have two context variables in my job. Named template and temporary. They are the locations of the folders. I want to copy all the files in template folder to the temporary folder. How do I do this? (Those files names can be fixed if required.)


Solution

  • There are two ways i can think that will get you around this problem:

    1. The easiest would be to use a tFileCopy component and set it up as shown below. The only problem would be that this will copy the whole template folder in the temporary folder and not just copy the files. enter image description here
    2. Another solution would be to use a tFileList component to iterate over the files in the template folder one by one and copy them to the temporary folder like this:enter image description here