Skip to Content
avatar image
Former Member

Unable to delete file from source location using SAP BODS

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Feb 10, 2017 at 03:04 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • Feb 14, 2017 at 10:12 AM

    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

    Add comment
    10|10000 characters needed characters exceeded