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?
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.
Thanks for suggestion but how would I rename file with current date concatenated.
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:
- After that, you create the parameter, for example “filename”
- 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:
The output file in my case looks like this: