01-26-2009 2:52 PM
Hi AIl,
I have to scheduled a background job which will move a file from source directory to archive directory with a timestamp added to the file. So I am using transaction - SM69 to define an external OS command which will be used for job scheduling and details are as follows.
cp /source/file1.txt /archive/file2--`date +%Y-%m-%d_%H:%M`
But while executing the command its throwing following error --
<< cp: target `+%Y-%m-%d_%H:%M`' is not a directory External program terminated with exit code 1>>
the same command is working perfectly with RSDB2CMD report, can any one know the reason of this error?
Cheers,
Raks
Edited by: Raks on Jan 26, 2009 10:21 AM
01-26-2009 3:26 PM
HI Raks,
Please do concatenation or joining your filename and timestamp before using cp command.
Dont try to combine them in your cp command
Regards
Krishna
01-27-2009 6:30 PM
Hi Nagendra,
Thanks a lot your reply, yes I am planning to have the 'cp' command inside custom os script in which the timestamp option with cp is working fine or to write a Zreport which will call the standard FM -- SXPG_EXECUTE_COMMAND and passing file name with timestamp has paramter.
Cheers,
Raks