cancel
Showing results for 
Search instead for 
Did you mean: 

Use exec to move file on Linux?

former_member280200
Participant
0 Kudos

Hi,

I am trying to move a file from one directory to another using the exec function in DS, here is my script:

exec('/bin/sh', ' -c "mv /sapmnt/DSD/DataServices/Incoming/GCL/Neulion/test.dat  /sapmnt/DSD/DataServices/Successful/GCL/Neulion"', 8);

My script works, except it move the entire Neulion directory instead of the file test.dat.

Does anyone have any idea why?

TIA

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

why don't you give file name as mentioned below:

exec('/bin/sh', ' -c "mv /sapmnt/DSD/DataServices/Incoming/GCL/Neulion/test.dat  /sapmnt/DSD/DataServices/Successful/GCL/Neulion/test.dat"', 8);



Bold part if added part.


former_member280200
Participant
0 Kudos

Finally - got it to work.

Missing single quote in between.

Answers (0)