2009 Jun 26 10:00 AM
Hi,
Could anyone please tell me how to move the application server files from one folder to
another through a program?
Regards,
Sudeep
2009 Jun 26 10:16 AM
Hi
U can copy the file from a folder to a target one by statament OPEN DATASET
* Open original file
OPEN DATASET FILE1 FOR INPUT IN TEXT MODE ENCODING DEFAULT.
IF SY-SUBRC = 0.
* Open target file
OPEN DATASET FILE2 FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
IF SY-SUBRC = 0.
DO.
* Read file 1
READ DATSET FILE1 INTO W_FILE.
IF SY-SUBRC <> 0. EXIT. ENDIF.
* Move file 1 to file 2
TRANSFER W_FILE TO FILE2.
ENDDO.
CLOSE DATASET FILE1.
CLOSE DATASET FILE2.
ENDIF.
ENDIF.But you can use FTP command, in this case try to see the program demo RSFTP007
Max
Hi,
Could anyone please tell me how to move the application server files from one folder to
another through a program?
Regards,
Sudeep
2009 Jun 26 10:16 AM
Hi
U can copy the file from a folder to a target one by statament OPEN DATASET
* Open original file
OPEN DATASET FILE1 FOR INPUT IN TEXT MODE ENCODING DEFAULT.
IF SY-SUBRC = 0.
* Open target file
OPEN DATASET FILE2 FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.
IF SY-SUBRC = 0.
DO.
* Read file 1
READ DATSET FILE1 INTO W_FILE.
IF SY-SUBRC <> 0. EXIT. ENDIF.
* Move file 1 to file 2
TRANSFER W_FILE TO FILE2.
ENDDO.
CLOSE DATASET FILE1.
CLOSE DATASET FILE2.
ENDIF.
ENDIF.But you can use FTP command, in this case try to see the program demo RSFTP007
Max
2009 Jun 26 12:33 PM
Hi,
Refer:
Tranfer file between folder in application server
Hope this helps you.
Regards,
Tarun
| User | Count |
|---|---|
| 6 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |