‎2009 Jan 11 6:50 AM
hi all,
how can i move file from one directory to another directory in apllication server (al11).
thank you.
‎2009 Jan 11 7:00 AM
Hi,
You can downlaod the data using OPEN DATASET,READ & CLOSE DATASET into internal table from the specified location of the apllication server and upload the data into the new folder of the Aplication server using OPEN DATASET,TRANSFER & CLOSE.
Now Using DELETE DATASET delete the old file from Application server.
OR
Ckeck this FM DX_FILE_COPY & EPS_FILE_DELETE
Edited by: Avinash Kodarapu on Jan 11, 2009 12:33 PM
‎2009 Jan 11 7:17 AM
‎2009 Jan 11 7:21 AM
hi,
I just hit a search with term
"move file in application server" and the very first result of the search had given various solutions, i would not paste the link though.
Use the search by urself to get the answer if the above program given by me has problems.
Happy searching on SDN
‎2009 Jan 12 9:04 AM
Hi,
You try this code for your requirement.
PARAMETERS:
s_file TYPE localfile DEFAULT '/tmp/xtest1.txt',
d_file TYPE localfile DEFAULT '/tmp/xtest2.txt'.
CONSTANTS:
c_buflen TYPE i VALUE 100.
DATA:
buf(100) TYPE x,
actlen TYPE i.
START-OF-SELECTION.
OPEN DATASET s_file FOR INPUT IN BINARY MODE.
IF sy-subrc = 0.
OPEN DATASET d_file FOR OUTPUT IN BINARY MODE.
IF sy-subrc = 0.
DO.
READ DATASET s_file INTO buf MAXIMUM LENGTH c_buflen ACTUAL LENGTH actlen.
IF actlen > 0.
TRANSFER buf TO d_file LENGTH actlen.
ELSE.
EXIT.
ENDIF.
ENDDO.
CLOSE DATASET d_file.
CLOSE DATASET s_file.
DELETE DATASET s_file.
ENDIF.
ENDIF.
Regards,
Joan
‎2011 Jun 22 5:56 AM
‎2009 Jan 21 5:10 AM