cancel
Showing results for 
Search instead for 
Did you mean: 

OS Command in Receiver File Adapter

Former Member
0 Kudos

I have a scenario where I need to execute a .BAT file in receiver file adapter.

I am doing following, eventhough RWB says the command executed successfully,

In fact the command is not getting executed.

<b>File Processing Parameters:</b>

Target Directory: d:/

File Name Scheme: EmployeeData

<b>Run OS Command After Message Processing</b>

d:/folder/ftp_internal.bat

<b>Content of the .BAT file:</b>

ftp -s:ftp_internal_script.txt>echo.txt

<b>Content of ftp_internal_script.txt</b>

open ftpxxx.xxx.com

userid

pwd

put xxx.txt

  • BAT file executes correctly outside XI, no syntax issues.

Could anyone please let me know what is that I am not doing right. Your help is greately appreciated.

Can we execute FTP commands from here.You may question me why I am not using the adapater itself, but it is long story. I need to explore this option for my implementation.

Thanks

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Venu,

Check these..

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

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

cheers,

Prashanth

P.S Please mark helpful answers

Former Member
0 Kudos

Which version of XI and which Service Pack you have ?

Anyway look to this OSS notes <a href="https://websmp110.sap-ag.de/~form/handler?_APP=01100107900000000342&_EVENT=REDIR&_NNUM=841704&_NLANG=E">841704 - XI File & JDBC Adapter: Operating system</a>

Regards

Sandro

Former Member
0 Kudos

We are using X 3.0 SP 13

Former Member
0 Kudos

I'am sure that XI 3.0 has a bug that prevent OS command to works, even if the audit of message in the runtime workbench said "Executed Succesfully".

I cannot find the oss note regarding this.

Anyway I'am pretty sure the SP13 was affected.

Please try to execute a very simple command like "mkdir c:\temp\testxi"

and verifiy that on server the dir c:\tempa\aa are created.

If not, it's time to apply new SP 19

Regards,

Sandro

Former Member
0 Kudos

Hi Venu,

do you succeed in the test I proposed you ?

I proposed to put in the Comm.Channel OS Command a very simple command like "mkdir c:\temp\testxi", and run a message, than to verify if the directory c:\temp\testxi are created on the server or not.

Regards,

Sandro

Former Member
0 Kudos

I tried mkdir command and it worked.

Former Member
0 Kudos

Hi,

Please check it:

d:
folder
ftp_internal.bat

and also try to put batch file into same directory which is affected and then write just this

ftp_internal.bat

/wojciech