09-10-2008 11:01 AM
Hi Abapers.
I've been searching in previous threads how to move files from one dir to another in the application server, but the solution of reading the file from the first dir and writting a new one in the new directory does not seem smart to me, at least that any of you could tell me about a function module which could do it in a smarter way.
Thanks for your helping.
09-10-2008 11:07 AM
if your application server is UNIX then you can do some thing like this..
Using the mv command we can move the files from one directory to another. For more details read the man pages on mv command.
REPORT ZUNIX line-size 400
no standard page heading.
data : unixcom like rlgrap-filename.
data: begin of tabl occurs 500,
line(400),
end of tabl.
data: lines type i.
*----------------------------------------------------------------------
start-of-selection.
refresh tabl.
unixcom = 'mv /dir1/file1 /dir2/fiel1'.
call 'SYSTEM' id 'COMMAND' field unixcom
id 'TAB' field tabl[].
"if there is some error you can see them in tabl
"Loop the tabl and write the results.
09-10-2008 11:07 AM
if your application server is UNIX then you can do some thing like this..
Using the mv command we can move the files from one directory to another. For more details read the man pages on mv command.
REPORT ZUNIX line-size 400
no standard page heading.
data : unixcom like rlgrap-filename.
data: begin of tabl occurs 500,
line(400),
end of tabl.
data: lines type i.
*----------------------------------------------------------------------
start-of-selection.
refresh tabl.
unixcom = 'mv /dir1/file1 /dir2/fiel1'.
call 'SYSTEM' id 'COMMAND' field unixcom
id 'TAB' field tabl[].
"if there is some error you can see them in tabl
"Loop the tabl and write the results.