Hi all,
I would like to copy a file to an other directory but I haven't succeeded to do that. I use OS command in process chain. File is located in
directory\xxx (not real) and I can see it when using transaction al11. What is the right operating system, operating system command and parameters for operating system command to make external operating system command (by SM69)? I was thinking simply to use copy-command?
Regards,
Minna
Request clarification before answering.
Hi Minna,
You need to use external commands for sure (see also http://help.sap.com/saphelp_nw2004s/helpdata/en/c4/3a6054505211d189550000e829fbbd/frameset.htm). Which external command and what the params are, depend on the OS where your system installed on.
Eddy
-
PS. Reward the useful answers and you will get <a href="http:///people/baris.buyuktanir2/blog/2007/04/04/point-for-points-reward-yourself">one point</a> yourself!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Minna
Use the <b>'Touch'</b> command which can update the access and modification times of a file. This is a UNIX OS command.
The <b>touch</b> command updates the access and modification times of each file specified by the File parameter of each directory specified by the Directory parameter. If you do not specify a value for the Time variable, the touch command uses the current time.
I have used this command to save files onto the application server directory.
Hope this helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
The touch command creates an empty file if it not already exist.
See also http://www.unet.univie.ac.at/aix/cmds/aixcmds5/touch.htm
Eddy
-
PS. Reward the useful answers and you will get <a href="http:///people/baris.buyuktanir2/blog/2007/04/04/point-for-points-reward-yourself">one point</a> yourself!
Hi,
Try and see whether it is working,
You can use Operating system - SunOs, Windows Env.
command - Copy
Parameters - o=rwx ./invoice.csv (your file path)
when you are executing you can give additional parameters
and you can specify target host and destination.
rgrds,
v.sen
Message was edited by:
Senthilkumar Viswanathan
Message was edited by:
Senthilkumar Viswanathan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
These are the file permission
O stands for others, thus not the owner and co members of the owner's group
R read
W write
X execute
See also http://www-acs.ucsd.edu/info/permissions.php
Eddy
-
PS. Reward the useful answers and you will get <a href="http:///people/baris.buyuktanir2/blog/2007/04/04/point-for-points-reward-yourself">one point</a> yourself!
Hi,
yes, SM69 (create) and SM49 (execute) would work.
otherwise create a little ABAP for that (found in another thread...)
report zfilecopy.
Parameters: d1 type localfile default '/usr/sap/filename.ext',
d2 type localfile default '/usr/sap/filename.ext'.
data: itab type string.
data: wa type string.
start-of-selection.
* Read file
open dataset d1 for input in text mode.
if sy-subrc = 0.
do.
read dataset d1 into wa.
if sy-subrc <> 0.
exit.
endif.
append wa to itab.
enddo.
endif.
close dataset d1.
* Copy to new file
open dataset d2 for output in text mode.
loop at itab into wa.
transfer wa to d2.
endloop.
close dataset d2.
* Delete the first
delete dataset d1.
hope this helps,
Olivier.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 4 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.