on 10-04-2013 11:00 AM
Hi,
I am having a file-to-file scenario without any mapping using an SFTP adapter to File Adapter.
The file that the SFTP adapter picks up is encrypted and has a .pgp file extension, now, the file gets decrypted correctly using the PGPDecryption but the .pgp extension is kept when the the receiving File adapter receives the file.
Please help with the options of removing the *.pgp file extension on the channel without having to use any mapping objects.
Hi Treasure,Have you got any solution for the problem you were facing? Appreciate your feedback as I am facing the same problem with one of my scenario where I have to remove the ".pgp" extension after decryption of the input file.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Arijit,
Sorry for the delay.
The command was: cmd.exe /C "ren %F %F*."
Where %F is the file name during runtime, there is also %f, I cannot remember what %f has, I think it is the file without an extension for %f.
How to test the command
From your windows OS, you can create a file.txt.pgp then run: CMD> ren file.txt.pgp file*.
The file will be renamed to file.txt because the *. addition on windows, assuming your PI server is running windows, removes the extension of the file which in the case of file.txt.pgp the .txt is not the extension, therefore removing the extension with a *. only removes the .pgp only.
Remark
In my scenario, I was picking the file from the SFTP with my sender channel only picking the files with a .pgp extension meaning I was always sure that my receiver channel will remove a .pgp extension only.
Hi Treasure,
You can try Run OS command after message processing if u are using NFS at reciver side and try rename command as follow
Regards
gagan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.