Copy a file
COPY source-file target-file
Copy c:\temp\source-file.txt
to c:\temp\target-file.txt
. You need to check OS-ERROR
for success or lack thereof.
OS-COPY VALUE("c:\temp\source-file.txt") VALUE("c:\temp\target-file.txt").
IF OS-ERROR <> 0 THEN DO:
MESSAGE "An error occured" VIEW-AS ALERT-BOX ERROR.
END.