webMethods

 View Only

 Managed File Transfer (MFT) - Write Content Option under Execute File Operation Event Action

Kailash Kumar Mishra's profile image
Kailash Kumar Mishra posted Wed January 08, 2025 02:06 AM

Hi All,

I am trying a POC for MFT by creating a Scheduled Event in the Active Transfer Server 10.7 Version.

Requirement

There are 2 csv files in a particular local folder. Merge the content of these Source files into a new File and place the file in a different local folder.

Source Files

FileOne.csv has content as : A,B,C

FileTwo.csv has content as : D,E,F

Target File

Content.csv : This file should have the content of both the Source Files as below

A,B,C

D,E,F

The Event created has First Action as Find which works as expected and list both the files. The Second Action is Write Content which though executes but creates a Blank csv file instead of merging the content from both the Source csv files.

Please let me know why Write Content option is not merging the content. Do I need to edit the configuration of the Write Content option or is it like Write Content option is not meant for merging of content of files passed by first Find Action.

Akshith Arremreddy's profile image
Akshith Arremreddy

I had a similar requirement about three years ago and i could not find a straight forward answer for this from anyone. I had to resort to creating a Powershell script to find the files and merge the files and then use that script in the AT task with the action "Execute Script" to achieve my goal. Having said that, maybe there is someone else out there who knows how to do this using purely Active transfer actions. Just my two cents.

Needless to say since that one experience, I have relied more on Powershell(Windows) and Shell(Linux\Unix) scripts to achieve complex tasks for MFT solutions using Active Transfer than using the inbuilt actions. Hope this helps!