Skip to Content
0

Unable to delete file from source location using SAP BODS

Feb 10, 2017 at 06:40 AM

173

avatar image

Our requirement is first move one file from one server to another server next delete the file from source location.

So we are able to move the file but not able to delete the file from source location.

We gave the below command to delete the file but its showing "rm: [foldername]/[filename]: No such file or directory


Command: print(exec('/usr/bin/sh','-c "rm [foldername]/[filename]" ',8))


Could you please help me and give some idea why its showing .

Thanks,

Riyanka

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

krishna vangara Feb 10, 2017 at 03:04 PM
0

What version of bods are you using ? if its 4.2 SP05 or above. Use folder location for folders. this supports sftp/ftp protocols too.


Share
10 |10000 characters needed characters left characters exceeded
Arun Sasi Feb 14, 2017 at 10:12 AM
0

You cannot simply execute the command without providing the correct input parameters as you are executing a command on linux. Refer to my answer in below thread. If you have any questions, refer Reference guide for syntax and other details.

Depending upon the shell on unix job server, you need to use the below. You need to provide the interpreter name

It should look something like below

exec('ksh','/usr/bin/sh','-c "rm [foldername]/[filename]',8);

https://archive.sap.com/discussions/thread/3841963

Regards

Arun Sasi

Share
10 |10000 characters needed characters left characters exceeded