cancel
Showing results for 
Search instead for 
Did you mean: 

os command for ftp server

Former Member
0 Kudos

I use file adapter receiver channel to transfer messages to external ftp servers. After a file is transported to the ftp server completely, I need to run a OS command to rename the file accordingly.

My question is where I should put the OS command file? On XI or ftp server? Any blog on this topic available?

Thanks!

Regards,

Hui

Accepted Solutions (0)

Answers (1)

Answers (1)

aashish_sinha
Active Contributor
0 Kudos

Hi,

Try using RUN OPERATING SYSTEM COMMAND AFTER MESSAGE PROCESING and RUN OPERATING SYSTEM COMMAND BEFORE MESSAGE PROCESING.

You just post ur output file in some folder(Target) , lets say /usr/sap/sapout/test/.and the shell script in this path /usr/sap/bin/convert.sh (use ur Rename logic here).

Inside the File access parameters put target directory and filename scehme and for shell script give processing parameters as File construction mode , File type and OS Command and use a space after the shell script name and the %F.

And for input can use it directly.

For the shell script (which u will use to rename the file after processing) you can put anywhere inside /INTERFACE/XI/ but athe time you provide the pat it will be exactly matching as from where you are using the Shell Script and the file at the coressponding places. It shud be in XI. Thats it and u r done.

Check out these links. First one will help you in acheiving want you want.

/people/sameer.shadab/blog/2005/09/21/executing-unix-shell-script-using-operating-system-command-in-xi

/people/michal.krawczyk2/blog/2007/02/08/xipi-command-line-sample-functions

/people/michal.krawczyk2/blog/2005/08/17/xi-operation-system-command--error-catching

http://help.sap.com/saphelp_nw70/helpdata/en/e3/94007075cae04f930cc4c034e411e1/content.htm

I hope this will solve your problem

Regards

Aashish Sinha

PS : reward points if helpful