Getting Output filename and extension same as the incoming filename and extension

I need to create a SFTP send port where I should get the output file name and extension same as that of the incoming filename

I had set the filename in the send port as "%SourceFileName%" but this did not work.

I have also assigned the input filename (without extension) in a variable in orchestartion. Is there any way i could get the output filename and extension same as that of the incoming message?

Any help would be much appreciated


  • Edited by ReKi111 Wednesday, February 11, 2015 6:19 AM
February 10th, 2015 8:11pm

Few things:

  1. You can only get the original file name from the File Adapter or FTP Adapter.
  2. They will populate the FILE.ReceivedFileName property with the full path so you will have to extract just the file name.
  3. You have to preserve this value through the entire process, including all in between Orchestrations.
  4. On the final outbound message, you have re-set, does not have to be Promoted, FILE.ReceivedFileName again to make it available through the %SourceFileName% macro.
MyOutgoingMessage(FILE.ReceivedFileName) = MyOriginalFilenameVariable;
Note: The property name is FILE.ReceivedFileName.



Free Windows Admin Tool Kit Click here and download it now
February 10th, 2015 9:08pm

Few things:

  1. You can only get the original file name from the File Adapter or FTP Adapter.
  2. They will populate the FILE.ReceivedFileName property with the full path so you will have to extract just the file name.
  3. You have to preserve this value through the entire process, including all in between Orchestrations.
  4. On the final outbound message, you have re-set, does not have to be Promoted, FILE.ReceivedFileName again to make it available through the %SourceFileName% macro.
MyOutgoingMessage(FILE.ReceivedFileName) = MyOriginalFilenameVariable;
Note: The property name is FILE.ReceivedFileName.



February 10th, 2015 9:08pm

The SFTP Adapter implements the %SourceFileName% macro just like the File and FTP adapters.

Set the TargetFileName property what ever filename pattern you require.

You can use %SourceFileName% by itself or as part of a longer string such as ReceivedAs_%SourceFileName%.txt

Free Windows Admin Tool Kit Click here and download it now
February 11th, 2015 4:52pm

The SFTP Adapter implements the %SourceFileName% macro just like the File and FTP adapters.

Set the TargetFileName property what ever filename pattern you require.

You can use %SourceFileName% by itself or as part of a longer string such as ReceivedAs_%SourceFileName%.txt

February 11th, 2015 4:52pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics