Serialize AMI format file to BAI2 format file

Hi,
How to Implement the below requirement using Camunda

Folder receives two files, one in BAI2 format and another in AMI format.
How do to take AMI format file and convert into BAI2 format?
How to do edit both the files to add a unique identifier to the end of each line in the file and place it another folder.
Thank you
Sasi