cancel
Showing results for 
Search instead for 
Did you mean: 

OS command in receiver file adapter

Former Member
0 Kudos

Hello Experts,

my requirement, i will get file name from outbound proxy,

using the file name, i need to move the file from one folder to another folder ( file NFS protocol ).

for this requirement do i need to use OS command  to move the file from one folder to another.

kindly let me know how to achieve this.

regards,

chinna

Accepted Solutions (0)

Answers (1)

Answers (1)

iaki_vila
Active Contributor
0 Kudos

Hi chinna,

Why dont use the file adapter itself?, the file adapter can be used to move files inside the filesystem. You can set a pattern in the sender file adapter to pick up the desired files and you dont need ESR development. I think  it will be easier to mantain a new scenario that to mantain a file script.

If you describe a little deeper your scenario the SCN community will help you better.

Regards.

Former Member
0 Kudos

Hi,

actual scenario is file to proxy.....once the data is successfully uploaded into proxy, in response i will get the file name, based on file name i need to move the file into archive directory else file stay in same folder.

regards,

chinna

iaki_vila
Active Contributor
0 Kudos

Hi,

I catch up your idea now. You can send the file name inside the XML and with the ASMA properties to get that filename and to copy later. You can check this wiki http://wiki.scn.sap.com/wiki/pages/viewpage.action?pageId=27217140, finally, in the "Run Operating System Command After Message Processing" you have an example to take the file by the ASMA filename. The example in that wiki could be helpful for you, you only need to change the rename command with the move/copy file statement. If you are in linux you have:

To move: mv source destination

To copy: cp source destination

Check this link: http://linuxcommand.org/lts0050.php

Regards.