%SourceFileName% is the key to this. Use this keyword as “File name” when you configure the Send Port.
In case of %SourceFileName%.XML as “File name”. “.XML” will be appended in the source file name. For example: if FileName.txt is the input file then the output file name will be FileName.txt.XML
You may have already been using %MessageID% as file name which provides unique file name which essentially is GUID.