cancel
Showing results for 
Search instead for 
Did you mean: 

Execute OS command from receiver file system

Former Member
0 Kudos

Hi,

I have a file to file interface developed in XI that simply transfers a file from an ftp location to XI file system. After that I want to execute an OS command after message processing. I have therefore written a batch file (.bat), that copies the file in ftp server and changes its name after entering the desirable directory, and I stored it in the same folder where txt file is generated from receiver file adapter, and in receiver file adapter, in "Run OS command after message processing" tab, I have written G://usr//sap//trans//script//new.bat. The bat file works fine when tested alone from command prompt inside XI filesystem, but when tested through XI it does nothing. However, in communication channel log, I can see that OS command executed successfully.

Any ideas??

It is urgent!!

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Evaggelos,

Instead of <b>G://usr//sap//trans//script//new.bat</b> try to give /usr/sap/trans/script/new.bat and see whether it calls or not? Also there are couple of weblogs written by Michal on calling OS commands. Please check these weblogs:

/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

---Satish

Former Member
0 Kudos

Thanks to you Satish as well. I will reward points.

MichalKrawczyk
Active Contributor
0 Kudos

hi,

have a look at my blog:

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

Regards,

michal

-


<a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

Former Member
0 Kudos

/usr/sap/trans/script/new.bat does not work either!

Michal,

how can I redirect my .bat;s file output to a file, in order to get an error description??

Former Member
0 Kudos

Michal,

Thanks a lot. Your blog was very helpful. I will reward you points for this.

Actually, the problem was with the .bat file, but in order to find out, I had to redirect the output error into a .txt file with ">/usr/sap/trans/error.txt", which I saw from your example.

Best Regards,

--Evaggelos