Situation:- In a B2B relationship when a file is picked from the event then if we need output file to be created with a same filename and extension of the input file.
Example:- Input File Name - Document.docx, Spreadsheet.xls. Output File Name - Document.docx, Spreadsheet.xls.
Solution:- This can be achieved if you provide the File Name for the target like File Target, FTP Target etc. as '$$baseInputFileName$$.$$fileExtension$$'. From the Context variable 'baseInputFileName', you can fetch the Input fileName and from the variable 'fileExtension', you can fetch the file extension of Input File.
This solution is useful when there is a need for an encrypted file with.pgp extension. For this scenario, the fileName is defined as '$$baseInputFileName$$.$$fileExtension$$' and its extension is defined as .pgp. The file is created like 'Document.docx.pgp' which is encrypted and secure file.
Article is closed for comments.