‎2011 Aug 24 4:07 PM
Hi experts,
I would like to execute the following OS statement, for moving files.
"mv /dir/file /dir/archive/file"
The command runs perfect via telnet on the server.
But when I execute the same via SM69 or program code "call system id command..." I always get the following error message:
"Can't exec external program (No sucha file or directory). External program terminated with exit code 1"
Our OS is HP-UX.
Any ideas, how I can execute the statement on the server via sap?
thx in advance
‎2011 Aug 24 4:26 PM
‎2011 Aug 24 4:26 PM
‎2011 Aug 25 7:26 AM
Hello Volker,
thank you for your fast answer.
However I've solved the problem on my own.
My mistake was, that I've entered (for testing via SM69) the whole statement into "Operating system command".
So I entered: "mv <old path> <new path>".
But in this field you only have to enter the command, thus "mv".
And the <old path> and <new path> you have to enter into the field "Parameters for os".
BTW: instead of LS -L you have to use LL
Kind regards
‎2011 Aug 25 7:47 AM
BTW: instead of LS -L you have to use LL
Not necessarily.
What you have found out about command and parameter does apply here as well.
‎2011 Aug 25 8:08 AM
I am an idiot, thank you very much for correcting my crazy statement.
‎2011 Aug 25 8:24 AM
No need for a self-reproach.
We all here were beginners some time ago.
‎2011 Aug 26 8:32 AM
Now I've to solve another problem.
I would like to execute the command with quotes ("), to secure correctness by files with spaces.
so the command should be:
mv "/dir/file" "/dir/archive/file"
In telnet it runs perfect, but when I execute it in SM69, I always get the message:
No such file or directory.
So I think, SAP can't handle the quotes.
Any ideas, how I can realize this statement?
thx again
‎2011 Aug 29 2:28 PM