CopyFile

Function With CopyFile you can copy a file.
Example CopyFile source=“C:\images\p100.gif”  destination=“C:\temp\p100.gif”

The file “C:\images\p100.gif” is copied into  “C:\temp\p100.gif”.

Format CopyFile source=“sourcefile”  destination=“destinationfile”

A copy of the source file is created with the specified name. If such a file already exists, it is overwritten. If the source file does not exist, no action is performed.

With

if Q[ok]

endif

you can query whether the copy operation has been successful.

With source= you can specify:

  • local files, e.g.  “C:\temp\abc.txt”
  • files in UNC notation, e.g. “\\P0012\GuiXT\abc.txt”
  • files on http or ftp servers, e.g. “http://www.synactive.com/demo/logon.gif”
  • files in the SAP Repository, e.g.. “SAPWR:ZGUIXT.logon.gif”

And with destination= you can specify:

  • local files, e.g..  “C:\temp\abc.txt”
  • files in UNC notation, e.g. “\\P0012\GuiXT\abc.txt”
  • files on http or ftp servers, e.g. “http://www.synactive.com/demo/logon.gif”
  • But no files in the SAP Repository

User and password, if required for an http/ftp server, can be notated as follows:

  •  ”ftp://user:password@synactive.com/demo/logon.gif”

 

CopyFile