trx
trx

Reputation: 2167

File Name in Send Port with PGP Encryption

The File Name in the Send Port should be set with the mask like ABC.txt.pgp. Since I have used the PGP Encryption Component it is generating the File name like ABC.pgp.txt.pgp. But what I need is just the ABC.txt.pgp. How can be this be done. Any help is greatly appreciated.

Thanks

Upvotes: 0

Views: 218

Answers (2)

trx
trx

Reputation: 2167

Thanks Johns-305. I included the Message assignment shape before the send shape and used the

SendMessage(FILE.ReceivedFileName) = "ABC.txt";

In the Send Port I used Filename as "%SourceFileName%". Now I get the filename as ABC.txt.pgp in the Send Port

Upvotes: 1

DTRT
DTRT

Reputation: 11040

What you are seeing is the expected behavior. If you are referring to this:

https://code.msdn.microsoft.com/windowsdesktop/BizTalk-Sample-PGP-ebcbc8b2

or one of it's derivatives, it will internally modify FILE.ReceivedFileName to append .pgp if that property is set.

So, if you use just %SourceFileName%, you will likely get the desired result. Otherwise, you will have to explicitly set FILE.ReceivedFileName to ABC.txt somewhere before the PGP component.

You can also modify the source code to remove this behavior. (Same Answer)

Upvotes: 1

Related Questions