This content has been marked as final. Show 4 replies
You can use B2B feature called "Preserve Filename".
As indicated by Nitesh, use the "preserve filename" in File/FTP/SFTP channel and set the filename from the middleware using ACTION NAME B2B header. If you are passing message to B2B using AQ/JMS then use action name as -
If you are passing message to B2B using fabric (default) then set below headers -
Setting Content Type is optional.
You may refer -
Thank you for that quick reply!
If i use preserve file name, the source file name will get retained. My requirement is to change the file name entirely. using some parameters from the source XML file. Will b2b.fileName work in this regard?
That's what I mentioned. Set the file name from middleware using file name header and make sure to select "preserve filename" in your channel. B2B will use file name passed in the header from middleware, as the file name to write it in the target directory.