Copy files with rename based on query

One Star

Copy files with rename based on query

Hello, I need to copy a bunch of files from a folder to another one and rename them during the process ; and I have a table on my database with the actual files' names and the destination names ; I stated a solution with contexte variable but lost my way ; Desperately need guidance to this, thank you
Fifteen Stars TRF
Fifteen Stars

Re: Copy files with rename based on query

Hi,

Here is the right direction:

tYourdatabaseInput --> tFlowToIterat --> tFileCopy

Hope this helps.


TRF
One Star

Re: Copy files with rename based on query

Dear TRF Thank you for your answer ; can you please elaborate this solution ?
Highlighted
Fifteen Stars TRF
Fifteen Stars

Re: Copy files with rename based on query

If you connect tFlowToIterate to your tDatabaseInput component, you'll get 1 global variable per field.

Assume you have 3 fields (currentFilename, destinationFolder and destinationFilename) and the flow after tDatabaseInput  is called "row1".

Here is the tFileCopy configuration :

Capture.PNG

 


TRF

15TH OCTOBER, COUNTY HALL, LONDON

Join us at the Community Lounge.

Register Now

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

Definitive Guide to Data Integration

Practical steps to developing your data integration strategy.

Download