Archiving output files


(Cenk AKtas) #1

Hello,
I’m looking for a way to move and rename(date concatenation) output files to an archive folder.
“Operate on file” task is not able rename file.
Is there a way to do such file operation?


(Katrin Popova) #2

Hello Cenk,

In case you would like to rename the file, Operate On File with operation Move can be used in a given workflow. In the Target file field, you can specify the expected name of the file. For example:

  • Source file: …/data/FTs/exports/file1.txt
  • Target file: …/data/FTs/exports/file2.txt

After that, you can use Operate On File to zip the given file.

Best regards,
Katrin Popova


(Cenk AKtas) #3

Thanks for suggestion but how would I rename file with current date concatenated.


(Katrin Popova) #4

Hello Cenk,

You can achieve this by parameterizing the file name in the Text File Writer step and then using a workflow to pass the parameter to the component. Please follow these steps:

  • Open Text File Writer step and right click on File Name and choose Map as Parameter:
    image
  • After that, you create the parameter, for example “filename”
    image
  • Then you create a workflow with Run DQC task, where you specify the parameter to be passed and the format of the output defined as an expression:
    image
    The output file in my case looks like this:
    image

Best regards,
Katrin Popova