Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

SFTP receiver channel Archive filename isssue


I am working on SAP SFTP adapter (SAP PI7.4).

SFTP receiver channel is placing the file with correct filename as generated by dynamic configuration code but sftp channel is adding an extra .txt extension in filename while archiving.

Example:       Actual Filename: CCBGI.SSEN_TNG.BATCH0000000000000052.sft

                    At archive folder : CCBGI.SSEN_TNG.BATCH0000000000000052.sft.txt



Please suggest resolution for this.

Thanks & Regards,

Nida Fatima

Former Member
Former Member replied

There is an SAP-note 1817747 on this which tells you: "It's not a bug, it's a feature".


At the sender side of SFTP Adapter, the flag "Archive Files on PI Server" is checked and the field "Archive name" is configured to archive the files on PI Server. During message processing, it is noticed, that, files are being archived in the archive directory with ".txt" extension.

Reason and Prerequisites

This feature has been added as a part of security so that the files will be saved with ".txt" extension in the archive directory. If it is allowed to be saved with original name on the PI server, then an external attack can manipulate the path where the file has been archived and gain access to OS related path and modify the files. Hence, to avoid such security issues, the file extension is always changed to ".txt".

Anyway, you might have a look at SAP-note 1815655 as there is an advanced parameter mentioned to add a "default extension" to a file.

Also, an advanced mode parameter "addDefaultFileExtension" has been introduced. If this parameter is set to 'true', then, while archiving the files on SFTP server, the additional check will be performed to check whether the file has ".txt" extension or not. If not, then the ".txt" extension will be added with the file name. Else, normal execution continues i.e. files will be archived on the SFTP server with their original name.

The default value for the parameter "addDefaultFileExtension" is 'false'.

3 View this answer in context
Not what you were looking for? View more on this topic or Ask a question