Skip to Content

Moving files between app' server directories.

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Sep 10, 2008 at 10: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.

    Add comment
    10|10000 characters needed characters exceeded