Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Moving files between app' server directories.

SantiMoreno
Participant
0 Kudos

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.

1 ACCEPTED SOLUTION

former_member188685
Active Contributor
0 Kudos

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.

1 REPLY 1

former_member188685
Active Contributor
0 Kudos

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.