on 09-06-2016 5:13 PM
Hello,
I am having File to SFTP interface , a simple copy with and hence no ESR content and using ASMA for filename. However the trick is that, the files that are generated from the application doesn't have any extension (tried different configurations in that system but no use) and the target application expects a file with extension say abc.txt.
Hence I tried to use OS level command both in File Sender (before message processing) and in SFTP receiver (after message processing). I tried with
mv %F %F.txt command in SFTP receiver adapter considering %F as FQDN path, however it seems it is trying to rename the file locally rather than on SFTP server.
Has anybody tried the same. Please let me know. I am just trying to avoid extra piece of work to create a java mapping to read DynamicConfiguration and change filename there.
Regards
Hi Ameet,
Try %f instead of %F - that should represent the file name while %F is for the path of the file.
Regards,
Ryan Crosby
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ryan,
I was able to frame a command, something like
sftp -oIdentityFile=<identity filepath>_-oPort=<sftp port> <sftp user>@<sftp host> <<< $'rename %F %F.txt'.
but this was not working since we found that PI server uses C-Shell and this command is not supported by the same. Instead I use more cleaner method and used DynamicConfigurationBean to write the value of ASMA to message.interface message attribute and replace the same using Variable Substitution technique.
Regards
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
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.