cancel
Showing results for 
Search instead for 
Did you mean: 

PI file adapter command line error

Former Member
0 Kudos

Hi,

I am having issues getting a command line .bat file to fire via the file adapter.

The bat file creates a local file just as a test so I can see how the command line option works.

I get the following error:

Error java.io.IOException: CreateProcess: \\server_name\Interfaces\Julian_test_files\In\create_trigger_file.baterror=2 excuting command ///server_name//Interfaces//Julian_test_files//In//create_trigger_file.bat

I thought it might be have been the escape sequence of the back and/or forward slashes

I initially copied the format as in this SAP XI File Adapter OS Command Line Feature

I'm not from a java background. I couldn't find anything on the web which matched my issue. I did find other references to Error java.io.IOException: CreateProcess: error=2 having something to do with "No such file or directory"; hence I was leaning towards something being wrong with the escape sequence of the special chars in the command line.

We have not used the command line option before where I'm working. We have just installed sp9 for PI 7.1 as we want to utilise the new sftp adapter.

Any thoughts would be appreciated.

Julian

Hi,

The solution to my issue was:

cmd.exe /C "D: & CHDIR Interfaces\Julian_test_files\In\ & create_trigger_file .bat"

The solution is so simple but why has SAP made it so hard to find the answer, surely it would not be too hard to document this.

cheers

Julian

PS how do you mark a discussion as closed??

Accepted Solutions (1)

Accepted Solutions (1)

gagandeep_batra
Active Contributor
0 Kudos

Hi Julian

can you check you have rights to create or execute that command using that credentials,

also you can try to login using ftp from server and execute those command and check for path on ftp server.

Regards,

Gagandeep

Answers (1)

Answers (1)

former_member184681
Active Contributor
0 Kudos

Hi,

In case of any problems with OS commands, you might use the trick described by Michal in one of his blogs here: http://scn.sap.com/community/pi-and-soa-middleware/blog/2005/08/17/xi-operation-system-command--erro...

This allows you to catch the error from the OS command. Maybe you'll find this useful one day.

Hope this helps,

Greg